Statesman and Foreign Policy by rty

This commit is contained in:
Kovid Goyal 2010-07-02 10:45:05 -06:00
parent 057b667345
commit dbf0a42b2d
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,28 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1278059020(BasicNewsRecipe):
title = u'Foreign Policy'
pubisher = 'http://www.foreignpolicy.com'
category = 'Magazine, USA Foreign Policy'
__author__ = 'rty'
oldest_article = 7
max_articles_per_feed = 100
masthead_url = 'http://www.foreignpolicy.com/images/fp_logo.jpg'
feeds = [(u'Feed', u'http://www.foreignpolicy.com/node/feed')]
remove_javascript = True
use_embedded_content = False
no_stylesheets = True
language = 'en'
encoding = 'utf-8'
conversion_options = {'linearize_tables':True}
def print_version(self, url):
return url + '?print=yes&hidecomments=no&page=full'
remove_tags = [
dict(name='div', attrs={'id':'share-box'}),
]
keep_only_tags = [
# dict(name='div', attrs={'class':'cxArticleHeader'}),
dict(name='div', attrs={'id':['art-mast','art-body']}),
]

View File

@ -0,0 +1,35 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1278049615(BasicNewsRecipe):
title = u'Statesman'
pubisher = 'http://www.statesman.com/'
description = 'Austin Texas Daily Newspaper'
category = 'News, Austin, Texas'
__author__ = 'rty'
oldest_article = 3
max_articles_per_feed = 100
feeds = [(u'News', u'http://www.statesman.com/section-rss.do?source=news&includeSubSections=true'),
(u'Business', u'http://www.statesman.com/section-rss.do?source=business&includeSubSections=true'),
(u'Life', u'http://www.statesman.com/section-rss.do?source=life&includesubsection=true'),
(u'Editorial', u'http://www.statesman.com/section-rss.do?source=opinion&includesubsections=true'),
(u'Sports', u'http://www.statesman.com/section-rss.do?source=sports&includeSubSections=true')
]
masthead_url = "http://www.statesman.com/images/cmg-logo.gif"
#temp_files = []
#articles_are_obfuscated = True
remove_javascript = True
use_embedded_content = False
no_stylesheets = True
language = 'en'
encoding = 'utf-8'
conversion_options = {'linearize_tables':True}
remove_tags = [
dict(name='div', attrs={'id':'cxArticleOptions'}),
]
keep_only_tags = [
dict(name='div', attrs={'class':'cxArticleHeader'}),
dict(name='div', attrs={'id':'cxArticleBodyText'}),
]