View Single Post
Old 10-31-2014, 07:59 AM   #3
ireadtheinternet
Member
ireadtheinternet began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Oct 2014
Device: Android
Smile

Thanks, Kovid, this helped a lot. I am still working on the overall recipe, but this part is out the way now.

Just for no reason, thought I would post what I ended up with. Not the whole recipe, because it is still in progress, just the attributes mentioned.

Code:
    keep_only_tags = [
        dict(name='div', attrs={'id': ['title-overview-widget']}),
    ]

    remove_tags = [
        dict(name='div', attrs={'id': ['meterChangeRow']}),
        dict(name='div', attrs={'id': ['meterHeaderBox']}),
        dict(name='div', attrs={'id': ['meterSeeMoreRow']}),
        dict(name='div', attrs={'class': ['star-box-rating-widget']}),
        dict(name='div', attrs={'class': ['star-box-details']}),
        dict(name='td',  attrs={'id': ['overview-bottom']}),
        dict(name='div', attrs={'class': ['pro-title-link text-center']})
    ]

Last edited by ireadtheinternet; 10-31-2014 at 07:57 PM.
ireadtheinternet is offline   Reply With Quote