From 0af5e1e9b13da11751c2f175f4555cb1352f4501 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 7 Mar 2016 09:10:40 -0600 Subject: [PATCH] Add 'averrating' and tweak description: adapter_literotica --- fanficfare/adapters/adapter_literotica.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fanficfare/adapters/adapter_literotica.py b/fanficfare/adapters/adapter_literotica.py index 74243643..32b37081 100644 --- a/fanficfare/adapters/adapter_literotica.py +++ b/fanficfare/adapters/adapter_literotica.py @@ -166,7 +166,7 @@ class LiteroticaSiteAdapter(BaseSiteAdapter): if isSingleStory: self.story.setMetadata('title', storyLink.text) - self.story.setMetadata('description', urlTr.findAll("td")[1].text) + self.story.setDescription(authorurl,urlTr.findAll("td")[1].text) self.story.addToList('eroticatags', urlTr.findAll("td")[2].text) date = urlTr.findAll('td')[-1].text self.story.setMetadata('datePublished', makeDate(date, self.dateformat)) @@ -190,7 +190,7 @@ class LiteroticaSiteAdapter(BaseSiteAdapter): descriptions = [] ratings = [] while chapterTr is not None and 'sl' in chapterTr['class']: - descriptions.append("
\n%d. %s" % (len(descriptions)+1, stripHTML(chapterTr.findAll("td")[1])) ) + descriptions.append("%d. %s" % (len(descriptions)+1,stripHTML(chapterTr.findAll("td")[1])) ) chapterLink = chapterTr.find("td", "fc").find("a") if not chapterLink["href"].startswith('http'): chapterLink["href"] = "http:" + chapterLink["href"] @@ -204,7 +204,7 @@ class LiteroticaSiteAdapter(BaseSiteAdapter): ratings.append(float(numrating)) ## Set description to joint chapter descriptions - self.setDescription(authorurl,"".join(descriptions)) + self.setDescription(authorurl,"

"+"

\n

".join(descriptions)+"

") ## Set the oldest date as publication date, the newest as update date dates.sort()