728x90
๋ฐ์ํ
pip install cloudscraper
import cloudscraper
scraper = cloudscraper.create_scraper() # returns a CloudScraper instance
# Or: scraper = cloudscraper.CloudScraper() # CloudScraper inherits from requests.Session
print scraper.get("http://somesite.com").text
๋๋ฌด์ํค ๋ํ Cloudflare๋ฅผ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ผ๋ฐ์ ์ธ ๋ฐฉ๋ฒ์ผ๋ก๋ ํฌ๋กค๋ง์ด ํ๋ค๋ค.
๊ทผ๋ฐ ์ด ๋ชจ๋ ์ค์นํ๋ฉด ํฌ๋กค๋ง์ด ๊ฐ๋ฅํด์ง.
์ถ์ฒ:
https://stackoverflow.com/questions/49087990/python-request-being-blocked-by-cloudflare
Python - Request being blocked by Cloudflare
I am trying to log into a website. When I look at print(g.text) I am not getting back the web page I expect but instead a cloudflare page that says 'Checking your browser before accessing' import
stackoverflow.com
728x90
๋ฐ์ํ
'๐จ๐ผโ๐ป๊ฐ๋ฐ > ํ์ด์ฌ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ์ด์ฌ - ini ์ค์ ํ์ผ ๋ถ๋ฌ์ค๊ธฐ (0) | 2022.05.08 |
---|---|
ํ์ด์ฌ - ์ค๋ ๋ ์๊ด ์์ด ํ๋ก๊ทธ๋จ ์์ ์ข ๋ฃ (0) | 2022.05.07 |
ํ์ด์ฌ - base64๋ฅผ ์ด๋ฏธ์ง ํ์ผ๋ก ์ ์ฅํ๊ธฐ (0) | 2021.12.08 |
ํ์ด์ฌ - ์ฌ๋ฌ๊ฐ์ ๋ฌธ์์ด ๋ณ๊ฒฝํ๊ธฐ (0) | 2021.12.08 |
Flask - static ํ์ผ๋ค ์ ๊ณตํ๊ธฐ (0) | 2021.12.08 |