F
F
fvckdeadline2019-07-28 17:31:44
PHP
fvckdeadline, 2019-07-28 17:31:44

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)

Perhaps the protection is related to cdn cloudflare or variti. How can I bypass the protection and get access to html?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2019-07-28
@dimonchik2013

Selenium use
there JS / metarefresh check, requests will fail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question