[EMAIL PROTECTED] writes:
> if i have a piece of html that looks like this
>
> cnn.com
> and i want to scrape out cnn.com , what syntax would i use? i have
> tried this and it doesn't work
> for incident in bs('td', {'class' : 'rulesbody'}, {'class' :
> 'rulesbody'} ):
If you're using BeautifulS
gene tani wrote:
> [EMAIL PROTECTED] wrote:
> > if i have a piece of html that looks like this
> >
> >
> > cnn.com
> >
> > and i want to scrape out cnn.com , what syntax would i use? i have
> > tried this and it doesn't work
> >
> > for incident in bs('td', {'class' : 'rulesbody'}, {'class' :
>
[EMAIL PROTECTED] wrote:
> if i have a piece of html that looks like this
>
>
> cnn.com
>
> and i want to scrape out cnn.com , what syntax would i use? i have
> tried this and it doesn't work
>
> for incident in bs('td', {'class' : 'rulesbody'}, {'class' :
> 'rulesbody'} ):
Did you try Beautifu
if i have a piece of html that looks like this
cnn.com
and i want to scrape out cnn.com , what syntax would i use? i have
tried this and it doesn't work
for incident in bs('td', {'class' : 'rulesbody'}, {'class' :
'rulesbody'} ):
--
http://mail.python.org/mailman/listinfo/python-list
I think bs = BeautifulSoup.BeautifulSoup( oFile) but I don't understand what you are doing...
(I never used BeautifulSoup...)
Maybe It is somthing like:
import itertools
for incident in itertools.chain(bs('tr', {'bgcolor' : '#ee'}), bs('tr', {'bgcolor' : 'white'})):
do_something()
Look
yaffa a écrit :
> dear python gurus,
One effectively needs to have some guru-powers to answer you question...
> quick question on syntax.
>
> i have a line of code like this
>
> for incident in bs('tr', {'bgcolor' : '#ee'}):
>
>
> what i want it to do is look
Where ?
> for 'bgcolor' :
On 11 Aug 2005 11:56:49 -0700, "yaffa" <[EMAIL PROTECTED]> wrote:
>dear python gurus,
>
>quick question on syntax.
>
>i have a line of code like this
>
>for incident in bs('tr', {'bgcolor' : '#ee'}):
>
>
>what i want it to do is look for 'bgcolor' : '#ee' or 'bgcolor' :
>'white' and then
dear python gurus,
quick question on syntax.
i have a line of code like this
for incident in bs('tr', {'bgcolor' : '#ee'}):
what i want it to do is look for 'bgcolor' : '#ee' or 'bgcolor' :
'white' and then do a whole bunch of stuff.
i've tried this:
for incident in bs('tr', {'bgco