mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-15 05:14:25 +01:00
adastrafanfic can have chapters with tags (<i>) in them. Allow get as well as post.
This commit is contained in:
parent
e6ebd956f8
commit
e645c054d8
3 changed files with 8 additions and 1 deletions
|
|
@ -113,7 +113,9 @@ class Adastrafanfic(FanfictionSiteAdapter):
|
|||
for o in allOptions:
|
||||
# warning=5 bypasses 'are you old enough' checks.
|
||||
url = self.url + "&warning=5&chapter=%s" % o['value']
|
||||
title = o.string
|
||||
# ad astra can have tags, like <i> in chapter titles.
|
||||
title = "%s" % o
|
||||
title = re.sub('<[^>]+>','',title)
|
||||
result.append((url,title))
|
||||
|
||||
# warning=5 bypasses 'are you old enough' checks.
|
||||
|
|
|
|||
|
|
@ -474,6 +474,8 @@ def replaceNotEntities(data):
|
|||
def removeEntities(text):
|
||||
# replace numeric versions of [&<>] with named versions.
|
||||
|
||||
if text is None:
|
||||
return text
|
||||
try:
|
||||
t = text.decode('utf-8')
|
||||
except UnicodeEncodeError, e:
|
||||
|
|
|
|||
3
main.py
3
main.py
|
|
@ -171,6 +171,9 @@ class RecentAllFilesServer(webapp.RequestHandler):
|
|||
self.response.out.write(template.render(path, template_values))
|
||||
|
||||
class FanfictionDownloader(webapp.RequestHandler):
|
||||
def get(self):
|
||||
self.post()
|
||||
|
||||
def post(self):
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue