Quote:
Originally Posted by kovidgoyal
Use postprocess_html and simply remove the href attribute from all <a> tags.
|
This is definitely a bit beyond me as I am not very knowledgeable about python or HTML. Here is what I came up with, but it doesn't seem to do it. What's missing?
def postprocess_html(self, soup):
for a in soup.findAll('a', href=True):
del a['href']
return soup