Skip to content

Commit

Permalink
Update The Guardian
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 6, 2014
1 parent 54909e3 commit 30ebdfe
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions recipes/guardian.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,29 @@ class Guardian(BasicNewsRecipe):
ignore_sections = []

timefmt = ' [%a, %d %b %Y]'

keep_only_tags = [
dict(name='div', attrs={'id':["content","article_header","main-article-info",]}),
]
dict(name='div', attrs={'id':["content","article_header","main-article-info",]}),
dict(attrs={'class':lambda x: x and set(x.split()).intersection({'content__head', 'content__main'})}),
]
remove_tags = [
dict(name='div', attrs={'class':["video-content","videos-third-column"]}),
dict(name='div', attrs={'id':["article-toolbox","subscribe-feeds",]}),
dict(name='div', attrs={'class':["guardian-tickets promo-component",]}),
dict(name='ul', attrs={'class':["pagination"]}),
dict(name='ul', attrs={'id':["content-actions"]}),
# article history link
dict(name='a', attrs={'class':["rollover history-link"]}),
# "a version of this article ..." speil
dict(name='div' , attrs={'class' : ['section']}),
# "about this article" js dialog
dict(name='div', attrs={'class':["share-top",]}),
# author picture
dict(name='img', attrs={'class':["contributor-pic-small"]}),
# embedded videos/captions
dict(name='span',attrs={'class' : ['inline embed embed-media']}),
# dict(name='img'),
]
dict(name='div', attrs={'class':[
"video-content","videos-third-column", 'meta__extras', 'submeta-container submeta-container--break-at-leftcol ']}),
dict(name='div', attrs={'id':["article-toolbox","subscribe-feeds",]}),
dict(name='div', attrs={'class':["guardian-tickets promo-component",]}),
dict(name='ul', attrs={'class':["pagination"]}),
dict(name='ul', attrs={'id':["content-actions"]}),
# article history link
dict(name='a', attrs={'class':["rollover history-link"]}),
# "a version of this article ..." speil
dict(name='div' , attrs={'class' : ['section']}),
# "about this article" js dialog
dict(name='div', attrs={'class':["share-top",]}),
# author picture
dict(name='img', attrs={'class':["contributor-pic-small"]}),
# embedded videos/captions
dict(name='span',attrs={'class' : ['inline embed embed-media']}),
]
use_embedded_content = False

no_stylesheets = True
Expand Down

0 comments on commit 30ebdfe

Please sign in to comment.