mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-04 07:03:44 +01:00
Strip leading 0s from story ids for canonical ids in AO3.
This commit is contained in:
parent
97a3e0c6af
commit
8154fd770c
1 changed files with 2 additions and 1 deletions
|
|
@ -82,7 +82,8 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter):
|
|||
|
||||
def getSiteURLPattern(self):
|
||||
# http://archiveofourown.org/collections/Smallville_Slash_Archive/works/159770
|
||||
return re.escape("http://")+re.escape(self.getSiteDomain())+r"(/collections/[^/]+)?/works/(?P<id>\d+)"
|
||||
# Discard leading zeros from story ID numbers--AO3 doesn't use them in it's own chapter URLs.
|
||||
return re.escape("http://")+re.escape(self.getSiteDomain())+r"(/collections/[^/]+)?/works/0*(?P<id>\d+)"
|
||||
|
||||
## Login
|
||||
def needToLoginCheck(self, data):
|
||||
|
|
|
|||
Loading…
Reference in a new issue