Answer the question
In order to leave comments, you need to log in
How to configure the parser to collect data after changing the city on the site?
There was a problem. There is a website planeta-sirius.ru. There is a problem with this site, on the position of the goods the price depends on the chosen city. If, for example, we take any item of goods, then the price for it in the city of Kazan for a large wholesale is 5194 rubles, in the city of Moscow it is 3730 rubles. The problem is that the parser takes the Kazan price, but the Moscow one is needed. The link is the same, it does not depend on it. How to fix this problem?
To change the city, a GET request is sent to the server www.planeta-sirius.ru/udata/users/saveUserCity/.js...
The numbers are the city, so it saves the city, what should I do? Kazan is the site's default.
Answer the question
In order to leave comments, you need to log in
On this site, not Kazan by default, but the city by geolocation. Your ip is determined as from Kazan. Use a proxy, find the Moscow proxy ip and parse through it.
This is the only method if you want to parse with php since curl can't execute js code.
PS If you really want to parse by executing js, then install node.js on your server and parse through puppeteer or through its analogues.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question