朋友们,我想在 espncricinfo 上提取实时比分,我尝试使用 dryscrape :-
Import dryscrape as d
d.start_xvfb()
br = d.Session()
br.visit('http://www.espncricinfo.com/ci/engine/match/index.html?view=live')
for x in br.xpath('//*[@class = "innings-info-1"]'):
x
#print 4 results
for y in br.xpath('//*[@class = "innings-info-2"]'):
y
#print 4 results of 2nd innings
#but when i try combian then print tooo many results
for x in br.xpath('//*[@class = "innings-info-1"]'):
for y in br.xpath('//*[@class = "innings-info-2"]'):
x,'\n',y
#need 4+4=8 results but python prints 16 results
请帮我