View Single Post
Old 05-25-2014, 08:16 AM   #1
vinny3777
Junior Member
vinny3777 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2014
Device: Kindle Paperwhite 2nd Generation
Question Video Removal from News Feed

I am trying to remove videos from my custom news feed. I have tried everything I know about python and nothing has worked. Can someone tell me what code I need to use in order to get rid of "This video cannot be played because the JavaScript isn't enabled"

Here is the code I made:

class AdvancedUserRecipe1400969285(BasicNewsRecipe):
title = u'NBC News'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
auto_cleanup_keep = '//div[@class="thumbnail"]'
filterDuplicates = True
remove_empty_feeds = True

feeds = [

(u'Top Stories' , u'http://feeds.nbcnews.com/feeds/topstories' )
,(u'U.S. News' , u'http://feeds.nbcnews.com/feeds/usnews' )
,(u'Technology' , u'http://feeds.nbcnews.com/feeds/technology' )
,(u'Investigations' , u'http://feeds.nbcnews.com/feeds/investigations' )
,(u'Business' , u'http://feeds.nbcnews.com/feeds/business' )
,(u'Science' , u'http://feeds.nbcnews.com/feeds/science' )
,(u'Health' , u'http://feeds.nbcnews.com/feeds/health' )

]

remove_tags = [

dict(name='div', attrs={'class''^.*video.*$')}),

]









Last edited by vinny3777; 05-25-2014 at 05:48 PM.
vinny3777 is offline   Reply With Quote