Skip to content

Commit

Permalink
adapter_literotica: Accept /beta/ URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmXinu committed Nov 9, 2020
1 parent e8f7524 commit 31b2c75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fanficfare/adapters/adapter_literotica.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(self, config, url):
url = re.sub(r"^(https?://)(www|german|spanish|french|dutch|italian|romanian|portuguese|other)(\.i)?",
r"\1www",
url)
url = url.replace('/beta/s/','/s/') # to allow beta site URLs.

## strip ?page=...
url = re.sub(r"\?page=.*$", "", url)
Expand Down Expand Up @@ -92,7 +93,7 @@ def getSiteExampleURLs(cls):
return "http://www.literotica.com/s/story-title https://www.literotica.com/s/story-title http://portuguese.literotica.com/s/story-title http://german.literotica.com/s/story-title"

def getSiteURLPattern(self):
return r"https?://(www|german|spanish|french|dutch|italian|romanian|portuguese|other)(\.i)?\.literotica\.com/s/([a-zA-Z0-9_-]+)"
return r"https?://(www|german|spanish|french|dutch|italian|romanian|portuguese|other)(\.i)?\.literotica\.com/(beta/)?s/([a-zA-Z0-9_-]+)"

def getCategories(self, soup):
if self.getConfig("use_meta_keywords"):
Expand Down

0 comments on commit 31b2c75

Please sign in to comment.