Quote:
Originally Posted by kidtwisted
Hey Starson17, help! 
|
I'll take a shot at it
Quote:
I've been having trouble making this work, adding this to the end of the recipe just breaks it.
|
Does "this" refer to the code below? If so, try this:
Code:
def postprocess_html(self, soup):
for tag in soup.findAll('dic', dict(attrs={'class':["article-info clearfix"]})):
#tag.extract()
print 'The tag to be extracted is: ', tag
return soup
If it's breaking because you're extracting something, then you probably shouldn't be extracting it - see what you're extracting with the print code above.
Quote:
Can I get a more detailed example, I did read something about first_fetch but not sure how to use it. Is there another recipe I could look at for example?
|
The entirety of relevant code is in your example. You find the tag in the soup and extract it. I'm not sure what else to point you to.