Thread: Needed help
View Single Post
Old 10-19-2015, 06:36 AM   #2
PandathePanda
a toy panda
PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.
 
PandathePanda's Avatar
 
Posts: 2,568
Karma: 26020474
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
OK. Fixed most of my problems by starting over

Here is what i've done so far. It works, but I'm unable to get rid of a few elements.
Code:
class AdvancedUserRecipe1445226821(BasicNewsRecipe):
    title          = u'EWN'
    oldest_article = 7
    max_articles_per_feed = 100
    auto_cleanup = True

    feeds          = [(u'Local', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=Local'), 
	(u'World', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=World'), 
	(u'Sport', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=Sport')]

    remove_tags = [ dict(name='div',  attrs={'class':'emailForm'}),
                dict(name='div',  attrs={'class':'byline'}),
                dict(name='div',  attrs={'class':'article-topics'}),
                dict(name='div',  attrs={'class':'comments'})
               ]
Trying to get rid of unneeded text by using the remove_tag function. Only the comments is being removed the rest not
PandathePanda is offline   Reply With Quote