mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Fix for fimfiction.net 'too many values to unpack' error
This commit is contained in:
parent
8905a08862
commit
63faea59d8
1 changed files with 3 additions and 2 deletions
|
|
@ -88,7 +88,8 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
|
||||
soup = bs.BeautifulSoup(data).find("div", {"class":"content_box post_content_box"})
|
||||
|
||||
title, author = [link.text for link in soup.find("h2").findAll("a")]
|
||||
title = soup.find("h2").find("a").text # first a link in first h2 is title.
|
||||
author = soup.find("h2").find("span",{'class':'author'}).find("a").text
|
||||
self.story.setMetadata("title", title)
|
||||
self.story.setMetadata("author", author)
|
||||
self.story.setMetadata("authorId", author) # The author's name will be unique
|
||||
|
|
@ -158,4 +159,4 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
if soup == None:
|
||||
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
|
||||
return utf8FromSoup(soup)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue