Почему выпадает ошибка 403 при парсинге сайта adidas.de?

При парсинге (php cURL) страницы https://www.adidas.de/frauen-sneakers выпадает ошибка 403. Видимо, сайт защищается от парсинга. Вот ниже мой код:

    $url = 'https://www.adidas.de/frauen-sneakers';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    $header = array(
    '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.7',
    'accept-language: en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7',
    'cache-control: max-age=0',
    'cookie: gl-feat-enable=CHECKOUT_PAGES_DISABLED; geo_ip=5.189.119.168; geo_country=RU; onesite_country=DE; geo_coordinates=lat=56.85, long=60.60; AKA_A2=A; sbsd_ss=ab8e18ef4e; akacd_plp_prod_adidas_grayling=3890698788~rv=23~id=eec2203c9e0501446a16ec5a436e9d65; mt.v=1.033191846.1713245990928; persistentBasketCount=0; userBasketCount=0; x-commerce-next-id=7641c825-97c4-4599-85ad-2796ec083517; pagecontext_cookies=; pagecontext_secure_cookies=; notice_preferences=%5B0%2C1%2C2%5D; ab_qm=b; AMCVS_7ADA401053CCF9130A490D4C%40AdobeOrg=1; s_cc=true; QSI_HistorySession=https%3A%2F%2Fwww.adidas.de%2Ffrauen-sneakers~1713245997584; QSI_SI_0evq2NrkQkQaBb7_intercept=true; newsletterShownOnVisit=true; bm_sz=45186C40D1FB3522438E51CF2C28065B~YAAQB4DdWOXpcMWOAQAA23t95RcJ76N2rV6S+YgYB2rJCqrmjYE0/T1jau4WqDm1DpxWqNAPybSwE8cok/cnqipGIGe7XjLiJPDo1stT3xg5EK3Z9nI8eNnAC5qs1n9+J69ge6O/Lqet+e9fXL7lKB6jWXxPeDlAqgX7PpSJiO8L0xP1u/DN9NDr8u5cRpmiXx3BXrHcCjlCzXJ73sKqgjEZjlx3Xey3CuuoFv6oHCVVtA3fwlOJpxAaWST2Hdll8Q/BKrAq+Y1LoVrLrTPFe39yli7eIAF7CBhiC3kXliRFgdTUI2nJhnfwe/MbyWdUjOS/r+kgZMGAgREQh5+oLZdVeoOs9Npsm/iz5FG9MLQBtv/wWXmeLjCZoWMxQX8D5k05LrAZOHj2sGdBFE61SOPsA8KsXUAudV3EuSmhzj0CT8mYoxCLwB6rgDY+VNcC47M=~3682373~4403249; UserSignUpAndSave=3; _abck=A5441BFF0E161B4315DFC7F197D551EB~-1~YAAQB4DdWAvqcMWOAQAAzId95QsdmC9/ihh4gXJ4aotmF7mjv07swKHVefmhK/Jvlr6H6q9y8xMcyE4RdYwumyLyrpfreLhI6zfRhkwOuGduWus4w/M2iKZZoKjPDjUY2aX0JDboGS1yKL64P1sISjRpUnrz7KKtpnIxUlbA7IiZoqSQCeOTvYjIwnUaAijaeV3dafr5Vc4NhNHPV3FYOvo3hPrFg8LTvrF3peDeIcBohIGeRBLiDXHGGr+cJAjFVKcndfMJ2ugNbrOBY3g+O9Y6zn9v5kK7ww9cZF/aOIds4tnk5l8QwH76XC4CHo1XS9SS5bvrmj83xNK4DAmeKnhgsH/lzPjGVjnzOR831vbZtk2pW0AIl+TgpA6T+swCzXHiL5tt9OoDGzk+djHXCX4BhKQerX3PA41yk8mxjnuaWHGIOFYDaVBVNH/xLAatplRXWK4YHk6TX+xgKm5/aDukHZ6GLNHAvNTyZWzND9qrljNZ87knyoPEEa9hip+WazDIa+l4~-1~-1~1713250793; ak_bmsc=9F8DBC2DAF9892163B5DC5322A424037~000000000000000000000000000000~YAAQB4DdWBTqcMWOAQAAV4p95Rc0PrFRWD27fH+n/qFe8oCll8qj0UazgbnVoJLNyc28bY5wiAXRLrkeEXV0spvH6CLqtK6QZfJ+G+qA3RR9onvPtKh2IKw43S1ttt3JeQqL1u7NAOslCzkXGOPO/B8cE7AObFku/BHFf5iEWdgnLNhQHvEiFnj8Jun0OL9/q3m2ZC2sIMG7kxUEeHvWz+agVdML6Br92zDMFAXgPN4wlFU9uDQOK0DdnGb6GKYlTQeVg9c83VHQDGfbV3uUbnjQjkeh0bcXvbiGX27fPOq9VyQjBo4BgDz9r8+Ahu466MWxZIIH1M/TEOUtKeuIuF83O78ma5GyWl64b9VOfQlii3C2ngg7o6buP/ePO4357eo75SWze2y1; s_pers=%20s_vnum%3D1714503600732%2526vn%253D1%7C1714503600732%3B%20pn%3D1%7C1715838008012%3B%20s_invisit%3Dtrue%7C1713248997699%3B; utag_main=v_id:018ee56b41a2004283e85615f4a005065002505d00fb8$_sn:1$_se:8%3Bexp-session$_ss:0%3Bexp-session$_st:1713248995968%3Bexp-session$ses_id:1713245995426%3Bexp-session$_pn:3%3Bexp-session$ab_dc:TEST%3Bexp-1718431195971$_vpn:3%3Bexp-session$_prevpage:PLP%7CG_WOMEN%7CPT_TRAINERS%3Bexp-1713250797685$ttdsyncran:1%3Bexp-session$dc_visit:1$dc_event:3%3Bexp-session$dcsyncran:1%3Bexp-session; AMCV_7ADA401053CCF9130A490D4C%40AdobeOrg=-227196251%7CMCIDTS%7C19830%7CMCMID%7C49791192017317256298472773599495290531%7CMCAID%7CNONE%7CMCOPTOUT-1713254398s%7CNONE; sbsd=suAGJcBtrLiiBYBqKh3DDoOKHX7ZWxTyezlveR0MwU1nlKjZ1w+4SEQfTqwk2L72ll/TvUOTA0463av7eqIlLdrvxst+x3fQcEs2H77HeSbOmu3Sg6+X1YttYIvTV9KR4sAA8zxCAz/uM3sEkJp8RifKw4DJBdieI+WjacbykyCA=; _abck=A5441BFF0E161B4315DFC7F197D551EB~-1~YAAQBIDdWEXeXJmOAQAA5mVs5QuHH6uOtxAr3fwM14hh39q7/YQZMoV8nw/Cr4SxquNpBtAaVOx4IAGlRGxB2F0FmA5T1wbx+hTdCp5ogFBZu+h4xG/J3a2a8D2a33HJVKv+l+yLCmP3zC7YcT35dyapF+kQ/4EoTZmHvWyurHzb6oFyKpDU5Hg2RPHqEX7LG9fQPDn4O+yj1qkdDkY8N2evN/2zWrU1G73V4SscflvN5D5Pn/sNDPXDYakF5n9EZV2vh9EJffVKKO6RRQP7qD3dYdqDYLpKuP+qKrP39/MIgEsHE8k3vok+5ZgQIvSlEMbp1OqKuF/u0/S+jeutPgz3bd3XCq+IeXmWIq4fO6RQIyhOdkCF85KgZ6RcHiQzsqGeLtmZUKeNgpIVqYrROSiAmYjlL5a4jaQ8nRI0lcTMy8bxTVbV9nhEJbrLSRHmbr6oOB85cpM2BXgOX0DSi0M6F1+XywlY/s87Lr31VKpm7aIdcV7jj+psArJdyp4Kfn2wgg8=~0~-1~1713249594; bm_sz=45186C40D1FB3522438E51CF2C28065B~YAAQN4DdWCsIK8WOAQAAsUCA5RfIsTZFECJ/dzIJET+QYnOUtwJHnDAmi63kTfIMECcGToyI2I9jrlNxXz05nbb5fqcWNvzFDkC2A1TV8Do5d6jO4US7bW8qfV0N2InGn1A4hRnYxhIivvsALGHxP0FHqAzlFaQCYzsZ9ikSE2S9rNWTX9TxN+CM6e5iLQOidBtcAyEn1lovbSBtj4f0mOzOlify+ENx6Y+CROtw2wC6EMLo+K8Yp5L6iviH9pu2d/+U1lSQYtfyFE5p9JWil4SdeoRrbvbJ0ewIzGDl0nwp/v4UChZKw6MHrsRsSmUHGWGmdnasI6xuWUiiJj8P2lxh/h4J0peNUU8EbRANsO9XglMn1vwXtVnNyGxwBxrHLSWwXpMMWf0SrCqaRz/yNXHgXO+4xvwUcTHC7zpnuJqN1qttT9GBQAiJsuLukImfhK7RgLAbunyx~3682373~4403249; sbsd=sRlmNQp07SrmNzmDFQ2I3EDdWJhmGcjdnoL3U9TAZEm0LjJZ8JS1WKE1YShk2gydm4wb7Qdzf/k9idK3nwKnN5h253QQo+EZO+tSI8dwywA8jTH2TYU1AYKoQdYG8dQzhQ0ycf6zH+kNIkrYXyoWF/j+M+b9c/CtU7tgWwQEb16A=; geo_coordinates=lat=56.85, long=60.60; geo_country=RU; onesite_country=DE',
    'dnt: 1',
    'referer: https://qna.habr.com/',
    'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
    'sec-ch-ua-mobile: ?0',
    'sec-ch-ua-platform: "Linux"',
    'sec-fetch-dest: document',
    'sec-fetch-mode: navigate',
    'sec-fetch-site: same-origin',
    'sec-fetch-user: ?1',
    'upgrade-insecure-requests: 1',
    'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'
  );
                    
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($curl, CURLOPT_PROXY, '23.227.38.168:80');
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    $html = curl_exec($ch);
    curl_close($ch);
    var_dump($html);

Заголовки headers скопированы из "дебагера" вкладки Network Chrome, в браузере открывается нормально. Что еще можно предпринять для обхода блокировки, даже не знаю... Есть у кого-то еще какие-нибудь идеи или мысли?


Ответы (0 шт):