首页 新闻 会员 周边

爬虫xpath匹配不出内容

0
[已关闭问题] 关闭于 2016-11-13 18:36
用谷歌浏览器的xpath helper可以匹配出信息,但是运行以下代码却没有打印出内容

from
lxml import etree
from urllib import request

url = "http://www.proxy.com.ru/list_1.html"
req = request.urlopen(url).read().decode("gb2312")
tree = etree.HTML(req)
for i in tree.xpath("//tbody/tr[position()>1]/td[3]"):
print(i.text)
戈野风吹的主页 戈野风吹 | 菜鸟二级 | 园豆:204
提问于:2016-11-13 17:07
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册