home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
Calibre
/
calibre-0.8.18.msi
/
file_280
/
politifact.recipe
< prev
next >
Wrap
Text File
|
2011-09-09
|
1KB
|
33 lines
from calibre.web.feeds.news import BasicNewsRecipe
class PolitiFactCom(BasicNewsRecipe):
title = u'Politifact'
__author__ = u'Michael Heinz'
oldest_article = 21
max_articles_per_feed = 100
language = 'en'
no_stylesheets = True
publication_type = 'magazine'
masthead_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png'
cover_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png'
remove_tags = [
dict(name='div', attrs={'class':'pfstoryarchive'}),
dict(name='div', attrs={'class':'pfhead'}),
dict(name='div', attrs={'class':'boxmid'}),
]
keep_only_tags = [dict(name='div', attrs={'class':'pfcontentleft'})]
feeds = [
(u'Articles', u'http://www.politifact.com/feeds/articles/truth-o-meter/'),
(u'Obamameter', u'http://politifact.com/feeds/updates/'),
(u'Statements', u'http://www.politifact.com/feeds/statements/truth-o-meter/')
]
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
br.set_handle_gzip(True)
return br