Re: help with link parsing?

2010-12-22 Thread Colin J. Williams
On 21-Dec-10 12:22 PM, Jon Clements wrote: import lxml from urlparse import urlsplit doc = lxml.html.parse('http://www.google.com') print map(urlsplit, doc.xpath('//a/@href')) [SplitResult(scheme='http', netloc='www.google.co.uk', path='/imghp', query='hl=entab=wi', fragment=''),

Re: help with link parsing?

2010-12-22 Thread Jon Clements
On Dec 22, 4:24 pm, Colin J. Williams cjwilliam...@gmail.com wrote: On 21-Dec-10 12:22 PM, Jon Clements wrote: import lxml from urlparse import urlsplit doc = lxml.html.parse('http://www.google.com') print map(urlsplit, doc.xpath('//a/@href')) [SplitResult(scheme='http',

Re: help with link parsing?

2010-12-21 Thread Jon Clements
On Dec 20, 7:14 pm, Littlefield, Tyler ty...@tysdomain.com wrote: Hello all, I have a question. I guess this worked pre 2.6; I don't remember the last time I used it, but it was a while ago, and now it's failing. Anyone mind looking at it and telling me what's going wrong? Also, is there a

help with link parsing?

2010-12-20 Thread Littlefield, Tyler
Hello all, I have a question. I guess this worked pre 2.6; I don't remember the last time I used it, but it was a while ago, and now it's failing. Anyone mind looking at it and telling me what's going wrong? Also, is there a quick way to match on a certain site? like links from google.com and

Re: help with link parsing?

2010-12-20 Thread Chris Rebert
On Mon, Dec 20, 2010 at 11:14 AM, Littlefield, Tyler ty...@tysdomain.com wrote: Hello all, I have a question. I guess this worked pre 2.6; I don't remember the last time I used it, but it was a while ago, and now it's failing. Anyone mind looking at it and telling me what's going wrong?