mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-19 15:24:18 +01:00
Normalize literotica.com URLs to www.literotica.com
This commit is contained in:
parent
2fe661fbb7
commit
f4a3b6e18d
1 changed files with 4 additions and 4 deletions
|
|
@ -47,10 +47,10 @@ class LiteroticaSiteAdapter(BaseSiteAdapter):
|
|||
storyId = re.sub("-ch-?\d\d", "", storyId)
|
||||
self.story.setMetadata('storyId', storyId)
|
||||
|
||||
## accept m(mobile)url, but use www.
|
||||
url = re.sub("^(www|german|spanish|french|dutch|italian|romanian|portuguese|other)\.i",
|
||||
"\1",
|
||||
url)
|
||||
## normalize to www.literotica.com.
|
||||
url = re.sub(r"^(https?://)(www|german|spanish|french|dutch|italian|romanian|portuguese|other)(\.i)?",
|
||||
r"\1www",
|
||||
url)
|
||||
|
||||
## strip ?page=...
|
||||
url = re.sub("\?page=.*$", "", url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue