S
S
Shad_lin2018-12-04 13:02:26
PHP
Shad_lin, 2018-12-04 13:02:26

PHP. How to parse dns-shop?

Tell me where to dig
There is a self-written PHP parser that worked well until I met the site dns-shop.ru.
Let's say you need to pull the price from the page https://www.dns-shop.ru/product/3137885507d43330/i...

$htmlPage = file_get_contents('https://www.dns-shop.ru/product/3137885507d43330/igra--red-dead-redemption-2-ps4/?finalize=1');

Returns a page that only consists of a script.
What tools can be used to parse such sites? file_get_contents as I understand it will not help

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rsa97, 2018-12-04
@Rsa97

And what prevents you from immediately pulling out the entire price list in your city?
https://www.dns-shop.ru/files/price/price-spb.zip

E
Evgen, 2018-12-04
@Verz1Lka

There is some problem here.
They have recently come under the protection of https://variti.com/ru-ru/.
Some JS is executed there and cookies are set to continue working with the site.

A
Alex-1917, 2018-12-05
@alex-1917

There was a topic, the author, get your ass off the chair and google it !!!
Well, in fact - a quick 40-second googling: https://yadi.sk/d/RvMR3C9qJSUgSg

C
cppdigger, 2021-12-29
@cppdigger

price lists like https://www.dns-shop.ru/files/price/price-spb.zip , https://www.dns-shop.ru/files/price/price-moscow.zip stopped updating in December 2020 I did not find any information for developers on the site, apparently it remains only to parse.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question