I am trying to parse several div blocks using Beautiful soup using some html from a website. However I cannot work out which function should be used to select these div blocks. I have tried the following:

I want to be able to select everything between `<div class="crBlock ">` and its correct end `</div>` (obviously there are other div tags but I want to select the block all the way down to the one that represents the end of this section of html.)

Many thanks SMNALLY

Last edited by SMNALLY on Wed Sep 25, 2013 9:41 pm, edited 1 time in total.

Actually, using class= actually works for you? When I saw you ask, I assumed that it was a legacy code kind of thing, but when I just tried to exemplify it, I can't use class= without getting a SyntaxError. If it works, I'd use that, since the underscore version is probably just legacy code, and it's just nicer without the underscore.

Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.