import lxml.html
import requests
response = requests.get('http://trend.caipiao.163.com/ssq/').text
result = lxml.html.fromstring(response)
result_str = result.xpath('//tbody[@id="cpdata"]/tr')
for i in result_str:
data = i.xpath('td/text()')[0]
red = i.xpath('td[@class="ball_red"]/text()')
brown = i.xpath('td[@class="ball_brown"]/text()')
blue = i.xpath('td[@class="ball_blue js-fold"]/text()')
print(data,red,brown,blue)