Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
253e491
commit a094219
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from calibre.web.feeds.news import BasicNewsRecipe | ||
|
||
class AdvancedUserRecipe1305547242(BasicNewsRecipe): | ||
title = u'Good to Know (uk)' | ||
oldest_article = 14 | ||
max_articles_per_feed = 100 | ||
no_stylesheets = True | ||
use_embedded_content = False | ||
remove_javascript = True | ||
__author__ = 'Anonymous' | ||
language = 'en_GB' | ||
remove_tags = [dict(name='div', attrs={'class':'articles_footer', 'class':'printoptions'})] | ||
|
||
def print_version(self, url): | ||
return url + '/print/1' | ||
|
||
def preprocess_html(self, soup): | ||
for alink in soup.findAll('a'): | ||
if alink.string is not None: | ||
tstr = alink.string | ||
alink.replaceWith(tstr) | ||
return soup | ||
|
||
feeds = [ (u'Family Conception Advice', u'http://www.goodtoknow.co.uk/feeds/family.rss'), | ||
(u'Family Health Advice', u'http://www.goodtoknow.co.uk/feeds/health.rss'), | ||
(u'Diet Advice', u'http://www.goodtoknow.co.uk/feeds/diet.rss'), | ||
(u'Food Advice', u'http://www.goodtoknow.co.uk/feeds/food.rss'), | ||
(u'Sex Advice', u'http://www.goodtoknow.co.uk/feeds/sex.rss'), | ||
(u'Easy Exercise', u'http://www.goodtoknow.co.uk/feeds/easyexercise.rss'), | ||
(u'Recipes', u'http://www.goodtoknow.co.uk/feeds/recipes.rss'), | ||
(u'Food Quick-tips', u'http://www.goodtoknow.co.uk/feeds/foodquicktips.rss'), | ||
] |