Fix PC World

This commit is contained in:
Kovid Goyal 2012-10-23 13:01:11 +05:30
parent f85923398e
commit 2f4949485a

View File

@ -35,6 +35,7 @@ class pcWorld(BasicNewsRecipe):
remove_javascript = True
no_stylesheets = True
auto_cleanup = True
def get_obfuscated_article(self, url):
br = self.get_browser()
@ -48,16 +49,16 @@ class pcWorld(BasicNewsRecipe):
self.temp_files[-1].close()
return self.temp_files[-1].name
keep_only_tags = [
dict(name='div', attrs={'class':'article'})
]
remove_tags = [
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='ul', attrs={'class':['tools', 'tools clearfix']}),
dict(name='li', attrs={'class':'sub'}),
dict(name='p', attrs={'id':'userDesire'})
]
#keep_only_tags = [
#dict(name='div', attrs={'class':'article'})
#]
#remove_tags = [
#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='ul', attrs={'class':['tools', 'tools clearfix']}),
#dict(name='li', attrs={'class':'sub'}),
#dict(name='p', attrs={'id':'userDesire'})
#]
feeds = [
(u'PCWorld Headlines', u'http://feeds.pcworld.com/pcworld/latestnews'),
(u'How-To', u'http://feeds.pcworld.com/pcworld/update/howto'),