View Single Post
Old 12-26-2011, 12:21 PM   #5
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,551
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
you could probably do it with preprocess_regexps but why? Are you sure want to remove all links? You're going to get missing text, e.g.,

As we (link)argued in this column last month(link), the current situation is...

becomes

As we, the current situation is...

If you want to remove certain links, then target them, for example

remove_tags= [ dict(name='a',attrs={'href':re.compile(r'doublecli ck\.net',re.I)}) ]

to remove doubleclick links
Barty is offline   Reply With Quote