Search code examples
seleniumweb-scrapingbearer-tokeninsomnia

How to get the bearer token using selenium python?


How to get this bearer token in selenium ?

When I am using an API client like Isomnia, I found that it can automatically get the bearer token after I have provided the cURL. However, when I am trying to get the bearer token with selenium, I found no such methods or attributes.


Solution

  • I found a solution: https://gist.github.com/rengler33/f8b9d3f26a518c08a414f6f86109863c

    It turns out the stuff that I was looking for were stored inside driver.get_log("performance").