View Single Post
Old 03-29-2017, 09:27 AM   #5
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
postprocess_html takes two arguments, otherwise it looks fine.
I changed it to the following and added it to my recipe, no hyperlinks were removed. They were not removed in the previous version either. What's wrong with the code?

def postprocess_html(self, soup, first_fetch):
for a in soup.findAll('a', href=True):
del a['href']
return soup
anleva is offline   Reply With Quote