Update Globe and Mail

This commit is contained in:
Kovid Goyal 2013-02-01 16:26:47 +05:30
parent 9cba7ea0a5
commit dac96c5074

View File

@ -21,6 +21,10 @@ class AdvancedUserRecipe1287083651(BasicNewsRecipe):
encoding = 'utf8' encoding = 'utf8'
publisher = 'Globe & Mail' publisher = 'Globe & Mail'
language = 'en_CA' language = 'en_CA'
use_embedded_content = False
no_stylesheets = True
auto_cleanup = True
extra_css = 'p.meta {font-size:75%}\n .redtext {color: red;}\n .byline {font-size: 70%}' extra_css = 'p.meta {font-size:75%}\n .redtext {color: red;}\n .byline {font-size: 70%}'
feeds = [ feeds = [
@ -44,12 +48,12 @@ class AdvancedUserRecipe1287083651(BasicNewsRecipe):
(re.compile(r'<script.*?</script>', re.DOTALL), lambda m: ''), (re.compile(r'<script.*?</script>', re.DOTALL), lambda m: ''),
] ]
remove_tags_before = dict(name='h1') #remove_tags_before = dict(name='h1')
remove_tags = [ #remove_tags = [
dict(name='div', attrs={'id':['ShareArticles', 'topStories']}), #dict(name='div', attrs={'id':['ShareArticles', 'topStories']}),
dict(href=lambda x: x and 'tracking=' in x), #dict(href=lambda x: x and 'tracking=' in x),
{'class':['articleTools', 'pagination', 'Ads', 'topad', #{'class':['articleTools', 'pagination', 'Ads', 'topad',
'breadcrumbs', 'footerNav', 'footerUtil', 'downloadlinks']}] #'breadcrumbs', 'footerNav', 'footerUtil', 'downloadlinks']}]
def populate_article_metadata(self, article, soup, first): def populate_article_metadata(self, article, soup, first):
if first and hasattr(self, 'add_toc_thumbnail'): if first and hasattr(self, 'add_toc_thumbnail'):