Answer the question
In order to leave comments, you need to log in
How to get the html of a page protected from site parsing?
When opening the source code of the page: https://www.off---white.com/en/RU/section/new-arrivals , the correct html is displayed in the browser.
When sending an http get request using a user-agent, html is blocked and an incomprehensible script is displayed on all pages of the site, the same, except for the
Python cookie:
headers= {"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Mobile/15E148 Safari/604.1"}
url = 'https://www.off---white.com/en/RU/section/new-arrivals'
r = requests.get(url, headers=headers)
print(r.text)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question