hi ,everyone,i want to scrape something from
http://search.dangdang .com/search_pub.php? key=python
my code is :
Code:
import urllib
import lxml.html
down='http://search.dangdang.com/search_pub.php?key=python'
file=urllib.urlopen(down).read()
root=lxml.html.fromstring(file)
tnodes = root.xpath("//div[@class='listitem detail']//li[@class='maintitle']//a")
for i,x in  enumerate(tnodes):
...