Quote:
Originally Posted by thoraxe
Is it possible to use regexp in the keep/remove/etc tags lines?
|
Yes.
Here's how I used it in the Skeptic recipe to remove div tags with an id that started with "follow":
Code:
remove_tags = [dict(name='div', attrs={'class':['Introduction','divider']}),
dict(name='div', attrs={'id':['feature', 'podcast']}),
dict(name='div', attrs={'id':re.compile(r'follow.*', re.DOTALL|re.IGNORECASE)}),
dict(name='hr'),
]