#-*—coding:utf8-*-
from lxml import etree
import requests
import re
#编码转换
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
headers= { 'User-Agent' : 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36' }
html = requests.get('http://flights.ctrip.com/actualtime/BJS-SHA/t20161223', headers = headers ).content
selector = etree.HTML(html)
urllist = selector.xpath('//div[@class="search-bd"]/ul/li[@class="fly-row"]/div[@class="inl flight"]/strong/text()')
for i in urllist:
print i