mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update NOAA Online
Fixes #1340797 [Updated recipe for NOAA Online](https://bugs.launchpad.net/calibre/+bug/1340797)
This commit is contained in:
parent
8ebae8ebe5
commit
5ffc5acb92
@ -24,12 +24,15 @@ class NOAA(BasicNewsRecipe):
|
|||||||
lang = 'en-US'
|
lang = 'en-US'
|
||||||
language = 'en'
|
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'})
|
||||||
|
]
|
||||||
|
|
||||||
|
feeds = [(u'NOAA articles', u'http://www.noaa.gov/rss/noaarss.xml')]
|
||||||
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')]
|
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
soup.html['xml:lang'] = self.lang
|
soup.html['xml:lang'] = self.lang
|
||||||
@ -39,4 +42,3 @@ class NOAA(BasicNewsRecipe):
|
|||||||
soup.head.insert(0,mlang)
|
soup.head.insert(0,mlang)
|
||||||
soup.head.insert(1,mcharset)
|
soup.head.insert(1,mcharset)
|
||||||
return self.adeify_images(soup)
|
return self.adeify_images(soup)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user