# coding:utf-8 from lxml import etree __author__ = 'Xaxdus' html = ''' 北京http代理ip_66免费代理ip提取网

免流量

''' root = etree.HTML(html) proxys = root.xpath(".//*[@id='footer']/div/table/tr[position()>1]") for proxy in proxys: print proxy.xpath('./td[1]')[0].text