I'm trying to scrape olx.pl website. I want to get a phone number from advert. Example advert is here: https://www.olx.pl/d/oferta/segment-98-m2-grodzisk-maz-CID3-IDKMf0O.html#dbf8b32c9c You need to click: Zadzwoń / SMS
to check phone number.
As you can see, the phone number is generate in two steps.
First is making request to: https://www.olx.pl/api/open/oauth/token/ This is POST request. Post params which is needed to make this request:
-
client_id
- this is into HTML source (CTRL+U in your browser) -
client_secret
- this is into HTML source (CTRL+U in your browser) -
grant_type
=> 'device' (always the same value) -
scope
=> 'i2 read write v2' (always the same value) -
device_id
- this param I need to calculate, but I don't know how -
device_token
- this param I need to calculate, but I don't know how
Second step is making POST
request for: https://www.olx.pl/api/v1/offers/683654480/phones/ Here is using everything from FIRST STEP.
My question is: How I can calculate device_id
and device_token
for first request? Into HTML source these params not exist.
source https://stackoverflow.com/questions/68600991/oauth-scraping-data-how-to-calculate-device-id-device-token
Comments
Post a Comment