mirror of
https://github.com/kemayo/leech
synced 2025-12-15 04:44:06 +01:00
Fix up the FictionPress site handler.
Updates the comment to a valid fictionpress story. Changes the matches method so it works like the one for FFN. As it is now, it didn't work for me. After this, works on the provided URL and several variants.
This commit is contained in:
parent
2ce43c9da7
commit
b78f3c0c77
1 changed files with 4 additions and 2 deletions
|
|
@ -82,5 +82,7 @@ class FanFictionNet(Site):
|
|||
class FictionPress(FanFictionNet):
|
||||
@staticmethod
|
||||
def matches(url):
|
||||
# e.g. https://www.fanfiction.net/s/4109686/3/Taking-Sights
|
||||
return re.match(r'^https?://www\.fictionpress\.com/s/\d+/?.*', url)
|
||||
# e.g. https://www.fictionpress.com/s/2961893/1/Mother-of-Learning
|
||||
match = re.match(r'^(https?://www\.fictionpress\.com/s/\d+)/?.*', url)
|
||||
if match:
|
||||
return match.group(1) + '/'
|
||||
|
|
|
|||
Loading…
Reference in a new issue