mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-22 08:44:13 +01:00
Allow for stories without series in adapter_silmarillionwritersguildorg, clean up whitespace.
This commit is contained in:
parent
cbc7c4b64b
commit
23f93bde24
1 changed files with 71 additions and 71 deletions
|
|
@ -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+$"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue