Add site specific reviews to wraithbait.com, allow ffnet story specific covers.

This commit is contained in:
Jim Miller
2014-07-02 19:48:43 -05:00
parent cefcb9ab96
commit babfc35f7b
3 changed files with 20 additions and 4 deletions
+8 -2
View File
@@ -1383,8 +1383,11 @@ type_label:Type of Couple
[www.fanfiction.net]
user_agent:
## fanfiction.net's 'cover' images are really just tiny thumbnails.
## Change this to false to use them anyway.
never_make_cover: true
## Set this to true to never use them.
#never_make_cover: false
## fanfiction.net shows the user's
cover_exclusion_regexp:/imageu/
## fanfiction.net is blocking people more aggressively. If you
## download fewer stories less often you can likely get by with
@@ -1808,6 +1811,9 @@ extracharacters:Wolverine,Rogue
## Site dedicated to these categories/characters/ships
extracategories:Stargate: Atlantis
extra_valid_entries:reviews
reviews_label:Reviews
[overrides]
## It may sometimes be useful to override all of the specific format,
## site and site:format sections in your private configuration. For
@@ -125,6 +125,10 @@ class WraithBaitComAdapter(BaseSiteAdapter):
rating=pt.text.split('[')[1].split(']')[0]
self.story.setMetadata('rating', rating)
st = soup.find('div', {'class' : 'storytitle'})
a = st.findAll('a', href=re.compile(r'reviews.php\?type=ST&item='+self.story.getMetadata('storyId')+"$"))[1] # second one.
self.story.setMetadata('reviews',stripHTML(a))
# Find the chapters:
for chapter in soup.findAll('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"&chapter=\d+$")):
# include author on chapters if multiple authors.
+8 -2
View File
@@ -1377,8 +1377,11 @@ type_label:Type of Couple
[www.fanfiction.net]
user_agent:
## fanfiction.net's 'cover' images are really just tiny thumbnails.
## Change this to false to use them anyway.
never_make_cover: true
## Set this to true to never use them.
#never_make_cover: false
## fanfiction.net shows the user's
cover_exclusion_regexp:/imageu/
## fanfiction.net is blocking people more aggressively. If you
## download fewer stories less often you can likely get by with
@@ -1808,6 +1811,9 @@ extracharacters:Wolverine,Rogue
## Site dedicated to these categories/characters/ships
extracategories:Stargate: Atlantis
extra_valid_entries:reviews
reviews_label:Reviews
[overrides]
## It may sometimes be useful to override all of the specific format,
## site and site:format sections in your private configuration. For