import requests
from lxml.html import etree



url = 'http://zst.aicai.com/ssq/betOrder/'
response = requests.get(url)
response_html = etree.HTML(response.text)
text_path = '/html/body/div[7]/form/div[2]/table/tbody/tr/td/text()'
data_list = response_html.xpath(text_path)
print(data_list)

count = 0
for a in data_list:
    
    if count == 0: print(f'期号:{a}')
    elif count == 1: print(f'日期:{a}')
    elif count == 2: print(f'出球顺序:{a}',end = '')
    elif count in (3,4,5,6): print(f'{a}',end = '')
    elif count == 7: print(f'{a}')
    elif count == 8: print(f'红球号码:{a}', end='')
    elif count in (9, 10, 11, 12): print(f'{a}', end='')
    elif count == 13: print(f'{a}')
    elif count == 14: print(f'蓝球号码:{a}')

    count += 1
    if count == 15: count = 0

相关文章:

  • 2021-06-25
  • 2021-12-28
  • 2021-05-19
  • 2022-12-23
  • 2021-09-30
  • 2021-12-05
  • 2022-01-02
  • 2021-05-24
猜你喜欢
  • 2022-12-23
  • 2021-08-18
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
相关资源
相似解决方案