"Tommy Kaas" <tommy.k...@kaasogmulvad.dk> wrote

for row in soup('table', {'class' : 'spad'})[0].tbody('tr'):

The example works fine, and I can change it a bit and it still works. But I simply don't understand how I am supposed to the fourth line - after "for row in soup". I can clearly see it defines the area I want to scrape, but
how is the syntax build?

Do you understand the syntax from a Python point of view?

that information myself? I have tried to read the help-file of
BeautifulSoup, but found nothing there.

Which help file?
There is a fairly good tutorial for Beautiful Soup here:

http://www.crummy.com/software/BeautifulSoup/documentation.html

Is that the one you meant?

Did you find the section "Searching By CSS class"?

If so we need more specific questionws about what you don't understand.
If not, try reading it and then come back for more... :-)

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to