Allow for stories without series in adapter_silmarillionwritersguildorg, clean up whitespace.

This commit is contained in:
Jim Miller 2020-05-27 09:54:39 -05:00
parent cbc7c4b64b
commit 23f93bde24

View file

@ -110,6 +110,7 @@ class SilmarillionWritersGuildOrgAdapter(BaseSiteAdapter):
try:
# Find Series name from series URL.
a = soup.find('a', href=re.compile(r"viewseries.php\?seriesid=\d+"))
if a:
seriesName = a.string
seriesUrl = 'https://'+self.host+'/archive/home/'+a['href']
@ -146,9 +147,8 @@ class SilmarillionWritersGuildOrgAdapter(BaseSiteAdapter):
i+=1
except Exception as e:
raise e
# I find it hard to care if the series parsing fails
#pass
logger.warn("series parsing failed(%s)"%e)
pass
# Find the chapters by regexing urls
chapters=soup.findAll('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"&chapter=\d+$"))