Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
actuall the full error is this: File "/home/felafela/BeautifulSoup.py", line 301, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
hey ken thanks for writing. when i try that i get told KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

Re: how to scrape url out of href

2006-01-02 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > mike's code worked like a charm. i have one more question. i have an > href which looks like this: > > > http://www.cnn.com";> > > > i thought i would use this code to get the href out but it fails, gives > me a keyerror: > > for incident in row('td', {

Re: how to scrape url out of href

2006-01-01 Thread [EMAIL PROTECTED]
mike's code worked like a charm. i have one more question. i have an href which looks like this: http://www.cnn.com";> i thought i would use this code to get the href out but it fails, gives me a keyerror: for incident in row('td', {'class':'all'}): n = incident.f

Re: how to scrape url out of href

2006-01-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: > i need to scrape a url out of an href. it seems that people recommend > that i use beautiful soup but had some problems. What problem are you having with BeautifulSoup? It's working fine for here. > does anyone have sample code for scraping the actual url out of an hr

Re: how to scrape url out of href

2006-01-01 Thread homepricemaps
sorry paul-i'm an extremely beginner programmer, if that! ;-) can you give me an example? thanks in advance Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > does anyone have sample code for scraping the actual url out of an href > > like this one > > > > http://www.cnn.com"; target="_blank"> > >

Re: how to scrape url out of href

2006-01-01 Thread Paul Rubin
[EMAIL PROTECTED] writes: > does anyone have sample code for scraping the actual url out of an href > like this one > > http://www.cnn.com"; target="_blank"> If you've got the tag by itself like that, just use a regexp to get the href out. -- http://mail.python.org/mailman/listinfo/python-list