Re: need help with python syntax

2005-12-24 Thread Mike Meyer
[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

Re: need help with python syntax

2005-12-24 Thread gene tani
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' : >

Re: need help with python syntax

2005-12-24 Thread gene tani
[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

need help with python syntax

2005-12-24 Thread homepricemaps
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

Re: need help with python syntax

2005-08-11 Thread Cyril Bazin
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

Re: need help with python syntax

2005-08-11 Thread Bruno Desthuilliers
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' :

Re: need help with python syntax

2005-08-11 Thread Bengt Richter
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

need help with python syntax

2005-08-11 Thread yaffa
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