import requests
url = 'https://www.whoscored.com/StatisticsFeed/1/GetPlayerStatistics'
params = {
'category': 'shots',
'subcategory': 'situation',
'isCurrent': 'false',
'playerId': '17',
'teamId': '',
'matchId': '',
'stageId': '',
'tournamentOptions': '',
'sortBy': 'seasonId',
'sortAscending': '',
'age': '',
'ageComparisonType': '0',
'appearances': '',
'appearancesComparisonType': '0',
'field': '',
'nationality': '',
'positionOptions': '^%^27FW^%^27,^%^27AML^%^27,^%^27AMC^%^27,^%^27AMR^%^27,^%^27ML^%^27,^%^27MC^%^27,^%^27MR^%^27,^%^27DMC^%^27,^%^27DL^%^27,^%^27DC^%^27,^%^27DR^%^27,^%^27GK^%^27,^%^27Sub^%^27',
'timeOfTheGameEnd': '5',
'timeOfTheGameStart': '0',
'isMinApp': '',
'page': '1',
'includeZeroValues': 'true',
'numberOfPlayersToPick': ''
}
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest',
'Host': 'www.whoscored.com',
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Referer':'https://www.whoscored.com/Players/17/History',
'Cookie': 'localeEditionShown_en=true; permutive-session=^%^7B^%^22session_id^%^22^%^3A^%^22e5386dfb-c58a-4882-b0e1-2cc2d9518982^%^22^%^2C^%^22last_updated^%^22^%^3A^%^222017-11-22T19^%^3A10^%^3A04.522Z^%^22^%^7D; visid_incap_774904=4xMirl1lRNOgrnN+Sm9S1zNx61kAAAAAREIPAAAAAACAsmaAAbBYMBjQTCqLf/D6wOVO4hdnKjIF; incap_ses_151_774904=/LX+SNRqsR8SzJi7p3YYAjKgGloAAAAApdQygw8VYBxbv/wvl7Be7A==; _gat=1; _gat_subdomainTracker=1; _ga=GA1.2.1522498341.1508602188; _gid=GA1.2.1243543827.1511694421'
}
res = requests.get(url, params=params, headers=headers)
fix = res.json()
print(fix)
我得到了以下错误:
^{pr2}$
有人能告诉我可能是什么问题吗?在
这个问题实际上与之前发布的以下讨论相关: