Quote:
Originally Posted by gambarini
Does "keep_only_tags" support more than one condition?
|
It doesn't support conditionals at all. It will allow you to define extensive lists of tags:
Code:
keep_only_tags = [dict(name='div', attrs={'class':['feature','banner']}),
dict(name='a', attrs={'id':['first','second','third']}),
dict(name='span', attrs={'potato':['idaho', 'red']})
]
Conditionals can be supported with other methods.
Edit: actually, it may support conditionals, I've just never used it.