Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python SeatGeek刮削证书颁发_Python_Selenium - Fatal编程技术网

Python SeatGeek刮削证书颁发

Python SeatGeek刮削证书颁发,python,selenium,Python,Selenium,我有以下代码,以前在我的旧电脑上工作,但现在我切换了笔记本电脑,它正在推送一个与客户端id相关的证书问题。你知道如何解决这个问题吗 gameIds = [5316872] url = 'https://seatgeek.com/rescraper/v2/listings' headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom

我有以下代码,以前在我的旧电脑上工作,但现在我切换了笔记本电脑,它正在推送一个与客户端id相关的证书问题。你知道如何解决这个问题吗

gameIds = [5316872]

url = 'https://seatgeek.com/rescraper/v2/listings'
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36'}
writer = pd.ExcelWriter(final, engine='xlsxwriter')

tables = []
for gameId in gameIds:
    payload = {
    '_include_seats': '1',
    'client_id': 'MTY2MnwxMzgzMzIwMTU4',
    'id': '%s' %gameId,
    'sixpack_client_id': '93d1ab10-07dc-4482-bb89-b87c2b144e33'}
    
    jsonData = requests.get(url, headers=headers, params=payload).json()
    df = pd.json_normalize(jsonData['listings'])
    df.to_excel(writer, sheet_name=gameId)
    tables.append(df)
    print(gameId)

table = pd.concat(tables)

writer = pd.ExcelWriter(final, engine='xlsxwriter')
table.to_excel(writer, sheet_name='Tickets')
writer.save()
print('Done')
错误:

requests.exceptions.SSLError: HTTPSConnectionPool(host='seatgeek.com', port=443): Max retries exceeded with url: /rescraper/v2/listings?
_include_seats=1&client_id=MTY2MnwxMzgzMzIwMTU4&id=5316872&sixpack_client_id=93d1ab10-07dc-4482-bb89-b87c2b144e33 
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

您没有定义“final”变量。如果没有熊猫,这对我来说是可行的,可能是一些问题。此外,如果您不怕拦截,您可以尝试将https更改为上述代码之外的httpI定义的“final”(这是一个个人驱动器位置)。对我来说,将https调整为http并没有解决这个问题。。