mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #4768 (Jerusalem Post Failed Feed)
This commit is contained in:
parent
3b28deb26e
commit
17c0f31808
@ -10,22 +10,19 @@ class JerusalemPost(BasicNewsRecipe):
|
|||||||
__author__ = 'Kovid Goyal'
|
__author__ = 'Kovid Goyal'
|
||||||
max_articles_per_feed = 10
|
max_articles_per_feed = 10
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_tags_before = {'class':'byline'}
|
remove_tags_before = {'class':'jp-grid-content'}
|
||||||
remove_tags = [
|
remove_tags_after = {'id':'body_val'}
|
||||||
{'class':['artAdBlock clearboth', 'tbartop', 'divdot_vrttbox',
|
|
||||||
'slideshow']},
|
|
||||||
dict(id=['artFontButtons', 'artRelatedBlock']),
|
|
||||||
]
|
|
||||||
remove_tags_after = {'id':'artTxtBlock'}
|
|
||||||
|
|
||||||
feeds = [ ('Front Page', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333346'),
|
feeds = [ ('Front Page', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333346'),
|
||||||
('Israel News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1178443463156'),
|
('Israel News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1178443463156'),
|
||||||
('Middle East News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333498'),
|
('Middle East News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333498'),
|
||||||
('International News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1178443463144'),
|
('International News', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1178443463144'),
|
||||||
('Editorials', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333211'),
|
('Editorials', 'http://www.jpost.com/servlet/Satellite?pagename=JPost/Page/RSS&cid=1123495333211'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def postprocess_html(self, soup, first):
|
def preprocess_html(self, soup):
|
||||||
for tag in soup.findAll(name=['table', 'tr', 'td']):
|
for x in soup.findAll(name=['form', 'input']):
|
||||||
tag.name = 'div'
|
x.name = 'div'
|
||||||
return soup
|
for x in soup.findAll('body', style=True):
|
||||||
|
del x['style']
|
||||||
|
return soup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user