Update NOAA Online

Fixes #1340797 [Updated recipe for NOAA Online](https://bugs.launchpad.net/calibre/+bug/1340797)
This commit is contained in:
Kovid Goyal 2014-07-11 21:14:30 +05:30
parent 8ebae8ebe5
commit 5ffc5acb92

View File

@ -24,12 +24,15 @@ class NOAA(BasicNewsRecipe):
lang = 'en-US'
language = 'en'
remove_tags = [dict(name=['embed','object'])
,dict(name='div', attrs={'id':'leftNav'})
,dict(name='div', attrs={'id':'topNav'})
,dict(name='div', attrs={'class':'feedback_box'})
,dict(name='div', attrs={'id':'midBlock'})
,dict(name='div', attrs={'id':'footer'})
]
remove_tags = [dict(name=['embed','object'])]
keep_only_tags = [dict(name='div', attrs={'id':'contentArea'})]
feeds = [(u'NOAA articles', u'http://www.rss.noaa.gov/noaarss.xml')]
feeds = [(u'NOAA articles', u'http://www.noaa.gov/rss/noaarss.xml')]
def preprocess_html(self, soup):
soup.html['xml:lang'] = self.lang
@ -39,4 +42,3 @@ class NOAA(BasicNewsRecipe):
soup.head.insert(0,mlang)
soup.head.insert(1,mcharset)
return self.adeify_images(soup)