T
T
tester2019-05-30 06:48:48
Parsing
tester, 2019-05-30 06:48:48

How to make a bulletin board parser?

I want to make an ad parser in the form of a table.
I'm going to do it using Datacol, everything is ok, but there is one problem - I can't parse the phone number, because it only appears after clicking on it.
The site itself - https://krisha.kz/
5cef526b4ef06991047542.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kim, 2019-05-30
@tokmaganbet

Go to the ad page and look for this:

<span class="show-phones" id="tm-telephone-body" data-url="/a/ajaxPhones?id=28104015" data-id="28104015">
  Показать телефон
</span>

Next, take the link from the attribute data-urland execute the request with the header XMLHttpRequest:
curl -X GET \
  'https://krisha.kz/a/ajaxPhones?id=28104015' \
  -H 'x-requested-with: XMLHttpRequest'

In response you get:
["+7 707 892 8095"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question