View Single Post
Old 03-28-2017, 10:36 PM   #3
anleva
Enthusiast
anleva began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Nov 2011
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
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

Last edited by anleva; 03-28-2017 at 11:50 PM.
anleva is offline   Reply With Quote