mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Raise error instead when the correct metadata can't be found on the author's page
This commit is contained in:
parent
db3878668b
commit
5823d335a4
2 changed files with 4 additions and 0 deletions
|
|
@ -97,6 +97,8 @@ class BloodshedverseComAdapter(BaseSiteAdapter):
|
|||
# parse the element
|
||||
if query_data['no'] == story_no:
|
||||
break
|
||||
else:
|
||||
raise exceptions.FailedToDownload(self.url)
|
||||
|
||||
title_anchor = list_box.find('a', {'class': 'fictitle'})
|
||||
self.story.setMetadata('title', title_anchor.string.strip())
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ class NocturnalLightNetAdapter(BaseSiteAdapter):
|
|||
# parse the element
|
||||
if story_id == url_tokens[url_tokens.index('story')+1]:
|
||||
break
|
||||
else:
|
||||
raise exceptions.FailedToDownload(self.url)
|
||||
|
||||
title = listbox.a.string
|
||||
self.story.setMetadata('title', title)
|
||||
|
|
|
|||
Loading…
Reference in a new issue