본문 바로가기

Python/Python Crawler

python requests로 데이터 가져올 때 403 forbidden

이미 솔루션이 있네요.

pip install cfscrape

https://github.com/Anorov/cloudflare-scrape

import cfscrape

scraper = cfscrape.create_scraper()
r = scraper.get("https://www.influenster.com/reviews/farmacy-honeymoon-glow-aha-resurfacing-night-serum-with-echinacea-greenenvytm")
r.status_code  # 200

print(r.content.decode('utf-8'))

'Python > Python Crawler' 카테고리의 다른 글

05 Python Selenium  (0) 2022.08.01
Crawler Movie ex  (0) 2022.08.01
04_Python_Crawler  (0) 2022.07.30