import http.client, json
conn = http.client.HTTPSConnection("www.dns-shop.ru")
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Cookie': 'city_path=sheregesh; lang=ru; current_path=77d4a40f3518cff66712951b0aab5c975d485a24781f0d92e5a0b2f7483def94a"%"3A2"%"3A"%"7Bi"%"3A0"%"3Bs"%"3A12"%"3A"%"22current_path"%"22"%"3Bi"%"3A1"%"3Bs"%"3A120"%"3A"%"22"%"7B"%"22city"%"22"%"3A"%"2227123674-cf73-4f0b-99ac-a467224fb289"%"22"%"2C"%"22cityName"%"22"%"3A"%"22"%"5Cu0428"%"5Cu0435"%"5Cu0440"%"5Cu0435"%"5Cu0433"%"5Cu0435"%"5Cu0448"%"22"%"2C"%"22method"%"22"%"3A"%"22geoip"%"22"%"7D"%"22"%"3B"%"7D; rerf=AAAAAGJ9tk1wByHxZjuEAg==; ipp_uid=1652405837271/vqoOJHsQh2JjUdGx/bG9JGKn4FDFBUhe6A1oZXw==; ipp_key=v1652405837271/v3394bd400b5e53a13cfc65163aeca6afa04ab3/fRSM+TFhtkK/u17cT0FCNA==',
'DNT': '1',
'Pragma': 'no-cache',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-User': '?1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36'
}
conn.request("GET", "/product/microdata/04d4ae5c-65a9-11e9-a208-00155df1b805/", bytes(json.dumps(headers), encoding="utf-8"))
res = conn.getresponse()
data = res.read()
print(data)
curl "https://www.dns-shop.ru/product/microdata/04d4ae5c-65a9-11e9-a208-00155df1b805/" ^
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" ^
-H "Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7" ^
-H "Cache-Control: no-cache" ^
-H "Connection: keep-alive" ^
-H "Cookie: ipp_uid=1652329633303/VZvHs1nYX4P4i53E/Njx2aI3oBmqheVJKCqZd9g==; city_path=sheregesh; lang=ru; current_path=77d4a40f3518cff66712951b0aab5c975d485a24781f0d92e5a0b2f7483def94a^%^3A2^%^3A^%^7Bi^%^3A0^%^3Bs^%^3A12^%^3A^%^22current_path^%^22^%^3Bi^%^3A1^%^3Bs^%^3A120^%^3A^%^22^%^7B^%^22city^%^22^%^3A^%^2227123674-cf73-4f0b-99ac-a467224fb289^%^22^%^2C^%^22cityName^%^22^%^3A^%^22^%^5Cu0428^%^5Cu0435^%^5Cu0440^%^5Cu0435^%^5Cu0433^%^5Cu0435^%^5Cu0448^%^22^%^2C^%^22method^%^22^%^3A^%^22geoip^%^22^%^7D^%^22^%^3B^%^7D; rerf=AAAAAGJ8jKEzMmjJB86iAg==; _csrf=df0f34e6d5f7286f020ccec402ec45b4b5afca784260c0948b45515beb7a3e29a^%^3A2^%^3A^%^7Bi^%^3A0^%^3Bs^%^3A5^%^3A^%^22_csrf^%^22^%^3Bi^%^3A1^%^3Bs^%^3A32^%^3A^%^223pPM5Ip5BVHEpacl7D4wX1rZe-N_4BRv^%^22^%^3B^%^7D; tmr_reqNum=517; _ga_FLS4JETDHW=GS1.1.1652349043.23.1.1652349043.0; ipp_key=v1652404475996/v3394bd400b5e53a13cfc65163beca2afa04ab3/EF3kGe7ayI38FHStifC3ww==; PHPSESSID=c16ec761c38e7fc94cf47f654aa059c2; phonesIdent=404b61708848c4ec3f4524f8d551c3bdd6e0c21970376c8b0fca0469f8985556a^%^3A2^%^3A^%^7Bi^%^3A0^%^3Bs^%^3A11^%^3A^%^22phonesIdent^%^22^%^3Bi^%^3A1^%^3Bs^%^3A36^%^3A^%^22816c4d07-d317-4484-919b-1442183a281e^%^22^%^3B^%^7D; dnsauth_csrf=5152ea7071e7d3bb4c056ad37779b2368eced77c7da09cc0f5dc0293032efa40a^%^3A2^%^3A^%^7Bi^%^3A0^%^3Bs^%^3A12^%^3A^%^22dnsauth_csrf^%^22^%^3Bi^%^3A1^%^3Bs^%^3A36^%^3A^%^228656f9a8-1b4a-4527-b237-718534d15966^%^22^%^3B^%^7D" ^
-H "DNT: 1" ^
-H "Pragma: no-cache" ^
-H "Sec-Fetch-Dest: document" ^
-H "Sec-Fetch-Mode: navigate" ^
-H "Sec-Fetch-Site: none" ^
-H "Sec-Fetch-User: ?1" ^
-H "Upgrade-Insecure-Requests: 1" ^
-H "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36" ^
--compressed
Я открыл вкладку в режиме инкогнито.
В инструментах разработчика проверил отсутствие куки. Выключил js для данного домена.
Вбил прямой адрес для JSON-файла("https://www.dns-shop.ru/product/microdata/035dd4bb...") и получил его.
Затем в девтул скопировал весь запрос для
Впрочем, пока я пошел обходным путем и получаю нужный результат через selenium.