from lxml import etree
from collections import defaultdict
import math
import requests
from matplotlib import pyplot as plt
import pandas as pd
d = defaultdict(list)
listp = list()
# 90+进球球队
setp = set()
Allset = set()
def httpgetHTML(numbertime):
urlstr = 'https://xj-sbr.prdasbbwla2.com/zh-cn/info-centre/sportsbook-info/results/1/normal/' + str(
numbertime) + '?opcode=HaoWin&tzoff=480&theme=Haowin'
var = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/91.0.4472.124 Safari/537.36 "
}
p = requests.get(urlstr, headers=var)
# with open("./haowin.html", 'w', encoding='utf-8') as fp:
# fp.write(p.text)
# print(p.text)
print('爬取数据结束')
p.close()
return p.text
def toHaoWin