By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,761 Members | 1,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,761 IT Pros & Developers. It's quick & easy.

lxml and links

P: n/a
I'm trying to extract all the links on a page with lxml. Ideally, I
would like it to return me a list of hrefs of each link on the page,
in a list.

How would I go about doing this?
Jun 28 '08 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Ampedesign wrote:
I'm trying to extract all the links on a page with lxml. Ideally, I
would like it to return me a list of hrefs of each link on the page,
in a list.

How would I go about doing this?
Read the manual?

http://codespeak.net/lxml/dev/lxmlht...ing-with-links
http://codespeak.net/lxml/dev/tutori...tree-iteration
http://codespeak.net/lxml/dev/xpathxslt.html#xpath

Stefan
Jun 28 '08 #2

P: n/a
On Jun 27, 10:00*pm, Stefan Behnel <stefan...@behnel.dewrote:
Ampedesign wrote:
I'm trying to extract all the links on a page with lxml. Ideally, I
would like it to return me a list of hrefs of each link on the page,
in a list.
How would I go about doing this?

Read the manual?

http://codespeak.net/lxml/dev/lxmlht...slt.html#xpath

Stefan
Yeah, I was just having some trouble understanding it.

But nevermind, I think I figured it out.
Jun 29 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.