$.ajax({ url: "https://cors-anywhere.herokuapp.com/http://vm1.culture.ru/abramtsevo/catalog/ajax.php", data: { PAGEN_1: 1, YEAR_SEARCH_LEFT: -99, YEAR_SEARCH_RIGHT: 1999, TEGS: "Вазы", }, type: 'POST', }); 

PS https://jsfiddle.net/3xLs75t9

After all, this function should return the value of the tag "Vases", and returns - "Painting"? Why?

On the page itself, if you look at the Network, the parameters, it seems, are identical: http://vm1.culture.ru/abramtsevo/catalog

  • one
    It’s hard to answer your question because the logic of what to return on the backend side and we don’t see it, and in your code there is an error herokuapp.com/ http: // vm1.culture - Vyacheslav Danshin
  • No, this is not an error - this is the cors-anywhere service API. - Timur Musharapov
  • to get a vase url should be vm1.culture.ru/abramtsevo/catalog/ajax.php - Vyacheslav Danshin

1 answer 1

The site sends more variables in the POST request than you do. Add "SET-FILTER": "Y" in the data and Вазы will return to you.

https://jsfiddle.net/yjb1sqfk/

  • I did not know how to correctly set the parameter with a dash, thanks! - Timur Musharapov