mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-27 17:38:19 +02:00
adapter_literotica: Restore chapter descs description when nothing else. #1058
This commit is contained in:
parent
4585afde50
commit
9346985718
1 changed files with 9 additions and 0 deletions
|
|
@ -183,6 +183,15 @@ class LiteroticaSiteAdapter(BaseSiteAdapter):
|
|||
elif descdiv and stripHTML(descdiv):
|
||||
# make sure there's something in the tag.
|
||||
self.setDescription(self.url,descdiv)
|
||||
else:
|
||||
## Only for backward compatibility with 'stories' that
|
||||
## don't have an intro or short desc.
|
||||
descriptions = []
|
||||
for i, chapterdesctag in enumerate(soup.select('p.br_rk')):
|
||||
# get rid of category link
|
||||
chapterdesctag.a.decompose()
|
||||
descriptions.append("%d. %s" % (i + 1, stripHTML(chapterdesctag)))
|
||||
self.setDescription(authorurl,"<p>"+"</p>\n<p>".join(descriptions)+"</p>")
|
||||
|
||||
if isSingleStory:
|
||||
## one-shots don't *display* date info, but they have it
|
||||
|
|
|
|||
Loading…
Reference in a new issue