【四】初步预测
作者:互联网
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
标签:fp,set,预测,text,537.36,初步,urlstr,import 来源: https://blog.csdn.net/qq_40179458/article/details/118707016