Re: [Tutor] using BeautifulSoup

2006-03-28 Thread jonasmg
Kent Johnson writes: > [EMAIL PROTECTED] wrote: >> anchor.findNext('code') fails: >> >> anchor = soup.fetch('a', {'href': '/wiki/List_of_country_calling_codes'}) >> print anchor >> >> [Calling code] >> >> anchor.findNext('code') >> [] > > are you sure that's what you got? Looks like a

Re: [Tutor] using BeautifulSoup

2006-03-27 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > anchor.findNext('code') fails: > > anchor = soup.fetch('a', {'href': '/wiki/List_of_country_calling_codes'}) > print anchor > > [Calling code] > > anchor.findNext('code') > [] are you sure that's what you got? Looks like an AttributeError to me - anchor is a *li

Re: [Tutor] using BeautifulSoup

2006-03-27 Thread jonasmg
[EMAIL PROTECTED] writes: >>jonasmg at softhome.net wrote: >>> Hi! >>> >>> I'm trying to use BeautifulSoup for get data from a table (on right) from: >>> http://en.wikipedia.org/wiki/United_states >>> >>> i.e. i would get data from 'Calling code' that it would be '+1' >>> >>>

Re: [Tutor] using BeautifulSoup

2006-03-27 Thread jonasmg
>jonasmg at softhome.net wrote: >> Hi! >> >> I'm trying to use BeautifulSoup for get data from a table (on right) from: >> http://en.wikipedia.org/wiki/United_states >> >> i.e. i would get data from 'Calling code' that it would be '+1' >> >> -- >> >> import urll

Re: [Tutor] using BeautifulSoup

2006-03-27 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi! > > I'm trying to use BeautifulSoup for get data from a table (on right) from: > http://en.wikipedia.org/wiki/United_states > > i.e. i would get data from 'Calling code' that it would be '+1' > > -- > > import urllib2 > from BeautifulSoup

[Tutor] using BeautifulSoup

2006-03-27 Thread jonasmg
Hi! I'm trying to use BeautifulSoup for get data from a table (on right) from: http://en.wikipedia.org/wiki/United_states i.e. i would get data from 'Calling code' that it would be '+1' -- import urllib2 from BeautifulSoup import BeautifulSoup url="http://en.wikipedia