View Single Post
Old 11-07-2018, 07:03 AM   #24
bobbysteel
Big Poppa
bobbysteel began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Jul 2010
Device: Nook
Quote:
Originally Posted by kovidgoyal View Post
beautifulsoup supports arbitrary python functions for matching, or even regexps. Something lke:

Code:
remove_tags=[dict(attrs={'class':re.compile(r'pattern')})]
Thanks that works. But for the remove_after I'm getting a problem still - Also
Code:
remove_tags_after = [dict(name=['articleBody'])]
is something wrong w/ that where it wouldn't leave off sections after <section name='articleBody'>?
bobbysteel is offline   Reply With Quote