Yes, just as DiapDealer said, you need to extract just the image tag not the entire line before passing it to soup to parse/fix. Having a closing div tag on the end of that line and passing it to soup will remove it since there is no matching starting div in the piece of code you passed to it.
Last edited by KevinH; 08-23-2017 at 09:43 AM.
|