M
M
Master Ruby2021-07-29 16:41:17
Python
Master Ruby, 2021-07-29 16:41:17

How to get Bearer token without opening a browser?

Hello!

There is an address to which I make a request to get data: https://www.olx.pt/api/v1/offers/629600501/phones/ .
The bottom line is that in order to parse data, you need to write in headers . I know how to get a token through the browser (dev. tools > headers requests), is it possible to somehow get this data through python requests, it's just that the token changes every day and you have to constantly go into the browser and then write the token back to the headers. 'Authorization': 'Bearer <token>'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-07-29
@Dunaevlad

Can. Either look for the official API and see the authorization from there, or repeat the authorization from the browser via requests. All requests can be found in the same Network tab in devtools.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question