From 7002f5806b592f7137d54bf6af57e89f751029a9 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 28 Jun 2018 15:40:38 -0500 Subject: [PATCH] adapter_webnovelcom: ignore 'ad-walled' chapters--the ad-wall bypass code stopped working, but isn't yet removed. --- fanficfare/adapters/adapter_webnovelcom.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fanficfare/adapters/adapter_webnovelcom.py b/fanficfare/adapters/adapter_webnovelcom.py index b252c149..a6be5fd5 100644 --- a/fanficfare/adapters/adapter_webnovelcom.py +++ b/fanficfare/adapters/adapter_webnovelcom.py @@ -152,7 +152,6 @@ class WWWWebNovelComAdapter(BaseSiteAdapter): parse_meta(meta_txt,'Editor:','editor') cats = bookdetails.find_all('a',href=re.compile(r'/category/list')) - print cats self.story.extendList('category',[stripHTML(cat) for cat in cats]) poptags = soup.find('p',{'class':'pop-tags'}) @@ -177,7 +176,11 @@ class WWWWebNovelComAdapter(BaseSiteAdapter): for volume in jsondata["data"]["volumeItems"]: for chap in volume["chapterItems"]: # Only allow free and VIP type 1 chapters - if chap['isVip'] not in {0, 1}: + if chap['isVip'] not in [0]: # removed VIP type 1 + # chapter (ad-wall'ed) + # because the ad-wall + # bypass code stopped + # working. --JM continue chap_title = 'Chapter ' + unicode(chap['index']) + ' - ' + chap['name']