mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Add more domains for AO3.
This commit is contained in:
parent
f087d7dda9
commit
031d9de356
1 changed files with 17 additions and 2 deletions
|
|
@ -77,7 +77,14 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter):
|
|||
|
||||
@classmethod
|
||||
def getAcceptDomains(cls):
|
||||
return ['archiveofourown.org','archiveofourown.com','download.archiveofourown.org','download.archiveofourown.com']
|
||||
return ['archiveofourown.org',
|
||||
'archiveofourown.com',
|
||||
'archiveofourown.net',
|
||||
'download.archiveofourown.org',
|
||||
'download.archiveofourown.com',
|
||||
'download.archiveofourown.net',
|
||||
'ao3.org',
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def getSiteExampleURLs(cls):
|
||||
|
|
@ -86,7 +93,15 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter):
|
|||
def getSiteURLPattern(self):
|
||||
# https://archiveofourown.org/collections/Smallville_Slash_Archive/works/159770
|
||||
# Discard leading zeros from story ID numbers--AO3 doesn't use them in it's own chapter URLs.
|
||||
return r"https?://(download\.)?archiveofourown\.(org|com)(/collections/[^/]+)?/works/0*(?P<id>\d+)"
|
||||
logger.debug(r"https?://" + r"|".join([x.replace('.','\.') for x in self.getAcceptDomains()]) + r"(/collections/[^/]+)?/works/0*(?P<id>\d+)")
|
||||
return r"https?://(" + r"|".join([x.replace('.','\.') for x in self.getAcceptDomains()]) + r")(/collections/[^/]+)?/works/0*(?P<id>\d+)"
|
||||
|
||||
# The certificate is only valid for the following names:
|
||||
# ao3.org,
|
||||
# archiveofourown.com,
|
||||
# archiveofourown.net,
|
||||
# archiveofourown.org,
|
||||
# www.ao3.org,
|
||||
|
||||
## Login
|
||||
def needToLoginCheck(self, data):
|
||||
|
|
|
|||
Loading…
Reference in a new issue