Collect 'fandoms' for adapter_scribblehubcom.

This commit is contained in:
Jim Miller 2021-06-03 11:20:23 -05:00
parent c26c9be76f
commit 91a7ce01a3
3 changed files with 10 additions and 4 deletions

View file

@ -3505,10 +3505,10 @@ website_encodings:Windows-1252,utf8
[www.scribblehub.com]
use_basic_cache:true
extra_valid_entries:views, averageWords
extra_valid_entries:views, averageWords, fandoms
views_label:Views
averageWords_label:Average Words (Chapter)
add_to_titlepage_entries:,views, averageWords
add_to_titlepage_entries:,views, averageWords, fandoms
## Scribble Hub chapters can include author's notes and news blocks. We've
## traditionally included them all in the chapter text, but this allows

View file

@ -181,6 +181,12 @@ class ScribbleHubComAdapter(BaseSiteAdapter): # XXX
for genre in genres:
self.story.addToList('genre', stripHTML(genre))
# Fandoms
if soup.find('div', string="Fandom"):
fandoms = soup.find('div', string="Fandom").next_sibling.find_all('a')
for fandom in fandoms:
self.story.addToList('fandoms', stripHTML(fandom))
# Content Warnings
if soup.find('ul',{'class': 'ul_rate_expand'}):
warnings = soup.find('ul',{'class': 'ul_rate_expand'}).findAll('a')

View file

@ -3500,10 +3500,10 @@ website_encodings:Windows-1252,utf8
[www.scribblehub.com]
use_basic_cache:true
extra_valid_entries:views, averageWords
extra_valid_entries:views, averageWords, fandoms
views_label:Views
averageWords_label:Average Words (Chapter)
add_to_titlepage_entries:,views, averageWords
add_to_titlepage_entries:,views, averageWords, fandoms
## Scribble Hub chapters can include author's notes and news blocks. We've
## traditionally included them all in the chapter text, but this allows