| 1 |
#!/usr/bin/env python |
| 2 |
__license__ = 'GPL 3' |
| 3 |
__copyright__ = 'zotzo' |
| 4 |
__docformat__ = 'restructuredtext en' |
| 5 |
''' |
| 6 |
http://www.epltalk.com |
| 7 |
''' |
| 8 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 9 |
|
| 10 |
|
| 11 |
class EPLTalkRecipe(BasicNewsRecipe): |
| 12 |
language = 'en' |
| 13 |
version = 2 |
| 14 |
__author__ = 'rylsfan' |
| 15 |
|
| 16 |
title = 'EPL Talk' |
| 17 |
publisher = 'The Gaffer' |
| 18 |
publication_type = 'Blog' |
| 19 |
category = 'Soccer' |
| 20 |
description = 'News and Analysis from the English Premier League' |
| 21 |
cover_url = 'http://bit.ly/hJxZPu' |
| 22 |
|
| 23 |
oldest_article = 3 |
| 24 |
max_articles_per_feed = 100 |
| 25 |
use_embedded_content = True |
| 26 |
remove_javascript = True |
| 27 |
encoding = 'utf8' |
| 28 |
|
| 29 |
conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language} |
| 30 |
|
| 31 |
remove_tags = [ |
| 32 |
{'class': 'feedflare'}, |
| 33 |
{'class': 'tweetmeme_button'}, |
| 34 |
{'class': 'eplrelated'}, |
| 35 |
{'p': 'Related posts:<ol>'}, |
| 36 |
] |
| 37 |
|
| 38 |
def preprocess_html(self, soup): |
| 39 |
return self.adeify_images(soup) |
| 40 |
|
| 41 |
feeds = [ |
| 42 |
('EPL Talk', 'http://feeds.feedburner.com/EPLTalk'), |
| 43 |
('MLS Talk', 'http://feeds.feedburner.com/majorleaguesoccertalksite'), |
| 44 |
] |
| 45 |
|
| 46 |
extra_css = ''' |
| 47 |
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;} |
| 48 |
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} |
| 49 |
p{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 50 |
body{font-family:Helvetica,Arial,sans-serif;font-size:small;} |
| 51 |
''' |