如何使用Selenium和python将承载令牌添加为chrome驱动程序作为标头参数?

时间:2018-12-04 16:41:16

标签: authentication selenium-webdriver web-crawler selenium-chromedriver bearer-token

我试图打开一个URL,该URL要求使用承载令牌作为标头参数: the header file shows the URL needs a bearer token which is generated after each login

我认为最简单的方法是将承载令牌添加到chrome驱动程序中。 我已经检查了该网站(the website),该网站显示了chrome驱动程序的参数,但我找不到解决方法。

我可以成功打开URL(响应JSON数据),如果我使用邮递员,只需在授权中添加承载令牌即可: enter image description here

否则,如果没有不记名令牌,它将显示以下信息:

enter image description here

所以问题是如何将不记名令牌添加到chrome驱动程序中,以便获取JSON数据?

0 个答案:

没有答案