mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
adapter_royalroadcom: Fixes for site changes. #923
This commit is contained in:
parent
bdb90941d3
commit
47ad5c1e1f
1 changed files with 3 additions and 4 deletions
|
|
@ -162,7 +162,7 @@ class RoyalRoadAdapter(BaseSiteAdapter):
|
|||
raise exceptions.StoryDoesNotExist(self.url)
|
||||
|
||||
## Title
|
||||
title = soup.select_one('.fic-header h1[property=name]').text
|
||||
title = soup.select_one('.fic-header h1').text
|
||||
self.story.setMetadata('title',title)
|
||||
|
||||
# Find authorid and URL from... author url.
|
||||
|
|
@ -190,14 +190,13 @@ class RoyalRoadAdapter(BaseSiteAdapter):
|
|||
chapter_id = match.group(1)
|
||||
self.chapterURLIndex[chapter_id] = len(self.chapterUrls) - 1
|
||||
|
||||
# this is forum based so it's a bit ugly
|
||||
description = soup.find('div', {'property': 'description', 'class': 'hidden-content'})
|
||||
description = soup.select_one('div.description div.hidden-content')
|
||||
self.setDescription(url,description)
|
||||
|
||||
self.story.setMetadata('dateUpdated', self.make_date(tds[-1][1]))
|
||||
self.story.setMetadata('datePublished', self.make_date(tds[0][1]))
|
||||
|
||||
for a in soup.find_all('a',{'property':'genre'}): # not all stories have genre
|
||||
for a in soup.find_all('a',{'class':'fiction-tag'}): # not all stories have genre
|
||||
genre = stripHTML(a)
|
||||
if not "Unspecified" in genre:
|
||||
self.story.addToList('genre',genre)
|
||||
|
|
|
|||
Loading…
Reference in a new issue