View Single Post
Old 11-19-2013, 04:30 PM   #1
tashk
Hello, I'd like to know w
tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.tashk juggles neatly with hedgehogs.
 
Posts: 22
Karma: 69062
Join Date: Mar 2012
Device: Kindle 4 NT, Paperwhite 2013
Question Can remove_tags search for div/style value?

Feed: http://feeds.feedburner.com/infosecResources
Sample article: http://resources.infosecinstitute.co...c+Resources%29

I want to remove the "Want to learn more??" boxes from the article. Here's the relevant part of the HTML source code:

Code:
<div style="margin:20px 0 25px 0;padding-left:25px;padding-right:25px;background-color:#CEECF5;font-size: medium; border:1px solid">
<strong>Want to learn more?? </strong> The InfoSec [...]
and here's my recipe:

Code:
class AdvancedUserRecipe1384894173(BasicNewsRecipe):
    title          = u'test'
    oldest_article = 15
    max_articles_per_feed = 100
    auto_cleanup = True

    feeds          = [(u'InfoSec Institute Resources', u'http://feeds.feedburner.com/infosecResources')]
    remove_tags = [dict(name='div', attrs={'style':'margin:20px 0 25px 0;padding-left:25px;padding-right:25px;background-color:#CEECF5;font-size: medium; border:1px solid'})]
For some reason this does not work as expected; the "Want to learn more??" text is not removed. Am I doing something wrong?
tashk is offline   Reply With Quote