mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix PC World
This commit is contained in:
parent
f85923398e
commit
2f4949485a
@ -35,6 +35,7 @@ class pcWorld(BasicNewsRecipe):
|
|||||||
|
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
auto_cleanup = True
|
||||||
|
|
||||||
def get_obfuscated_article(self, url):
|
def get_obfuscated_article(self, url):
|
||||||
br = self.get_browser()
|
br = self.get_browser()
|
||||||
@ -48,16 +49,16 @@ class pcWorld(BasicNewsRecipe):
|
|||||||
self.temp_files[-1].close()
|
self.temp_files[-1].close()
|
||||||
return self.temp_files[-1].name
|
return self.temp_files[-1].name
|
||||||
|
|
||||||
keep_only_tags = [
|
#keep_only_tags = [
|
||||||
dict(name='div', attrs={'class':'article'})
|
#dict(name='div', attrs={'class':'article'})
|
||||||
]
|
#]
|
||||||
remove_tags = [
|
#remove_tags = [
|
||||||
dict(name='div', attrs={'class':['toolBar','mac_tags','toolBar btmTools','recommend longRecommend','recommend shortRecommend','textAds']}),
|
#dict(name='div', attrs={'class':['toolBar','mac_tags','toolBar btmTools','recommend longRecommend','recommend shortRecommend','textAds']}),
|
||||||
dict(name='div', attrs={'id':['sidebar','comments','mac_tags']}),
|
#dict(name='div', attrs={'id':['sidebar','comments','mac_tags']}),
|
||||||
dict(name='ul', attrs={'class':['tools', 'tools clearfix']}),
|
#dict(name='ul', attrs={'class':['tools', 'tools clearfix']}),
|
||||||
dict(name='li', attrs={'class':'sub'}),
|
#dict(name='li', attrs={'class':'sub'}),
|
||||||
dict(name='p', attrs={'id':'userDesire'})
|
#dict(name='p', attrs={'id':'userDesire'})
|
||||||
]
|
#]
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'PCWorld Headlines', u'http://feeds.pcworld.com/pcworld/latestnews'),
|
(u'PCWorld Headlines', u'http://feeds.pcworld.com/pcworld/latestnews'),
|
||||||
(u'How-To', u'http://feeds.pcworld.com/pcworld/update/howto'),
|
(u'How-To', u'http://feeds.pcworld.com/pcworld/update/howto'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user