From b4e58a41c42a4fabf085ee46b12520231d699d8d Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 5 Jul 2019 08:21:08 -0500 Subject: [PATCH] adapter_wuxiaworldco: Don't include grayed out 'In preparation' chapters --- fanficfare/adapters/adapter_wuxiaworldco.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fanficfare/adapters/adapter_wuxiaworldco.py b/fanficfare/adapters/adapter_wuxiaworldco.py index 1c0ce92b..2c69cd45 100644 --- a/fanficfare/adapters/adapter_wuxiaworldco.py +++ b/fanficfare/adapters/adapter_wuxiaworldco.py @@ -114,9 +114,11 @@ class WuxiaWorldCoSiteAdapter(BaseSiteAdapter): volume = match.group(1) + ' ' elif el.name == u'dd': a = el.a - url = urlparse.urljoin(self.url, a['href']) - title = volume + stripHTML(a) - self.add_chapter(title, url) + if a['style'] != 'color:Gray;': + # skip grayed out "In preparation" chapters + url = urlparse.urljoin(self.url, a['href']) + title = volume + stripHTML(a) + self.add_chapter(title, url) # else: # logger.debug('Unexpected tag in #list > dl: %s', el.name)