MacOS_Parsers/Pars_Decathlon/parser test1 cloudflare.py

11 lines
386 B
Python

import cloudscraper
url = 'https://www.decathlon.pl/sporty/turystyka-trekking/namioty-kempingowe-rodzinne?from=0'
scraper = cloudscraper.create_scraper() # автоматически создаёт обход защиты
response = scraper.get(url)
print('Код ответа:', response.status_code)
print('Содержимое страницы:', response.text[:500])