Answer the question
In order to leave comments, you need to log in
How to parse olx phone numbers?
The other day I learned how to get the Product Name, Price, Ad Owner Name and Link through bs4, but ...
I would like to know how to parse numbers with olx? I know that olx has api and they themselves give my cherished number at my request, but there is no sane documentation for the library (pyolx) anywhere. I don't understand how to work with her.
I know about the possibility of parsing with selenium through webdriver, but this significantly complicates the task than the previous possibility.
Answer the question
In order to leave comments, you need to log in
import requests
headers = {
'Accept':'*/*',
'Host': 'www.olx.ua',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode ': 'cors',
'Sec-Fetch-Site': 'same-origin',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0',
'X-Platform-Type': 'mobile-html5',
'Authorization': 'Bearer d1010d86244a2895e25e47e10d696b46290e2a92',
}
print(requests.get(
'https://www.olx.ua/api/v1/offers/719974471/limited-phones/',
headers=headers,
# cookies=cookie
).text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question