diff --git a/net/Makefile b/net/Makefile index ba6490e7743e..84d5fd7e3aad 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1022,6 +1022,7 @@ SUBDIR += py-cjdns SUBDIR += py-cloudflare-scrape SUBDIR += py-cloudflare-scrape-js2py + SUBDIR += py-cloudscraper SUBDIR += py-coherence SUBDIR += py-confluent-kafka SUBDIR += py-cymruwhois diff --git a/net/py-cloudscraper/Makefile b/net/py-cloudscraper/Makefile new file mode 100644 index 000000000000..2bc06e88680e --- /dev/null +++ b/net/py-cloudscraper/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= cloudscraper +DISTVERSION= 1.2.9 +CATEGORIES= net python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= tcberner@FreeBSD.org +COMMENT= Python module to bypass Cloudflare's anti-bot page #' + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}openssl>17.0:security/py-openssl@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Js2Py>0:devel/py-Js2Py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}brotli>0:archivers/py-brotli@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist + +USE_GITHUB= yes +GH_ACCOUNT= VeNoMouS + +CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}cloudflare-scrape-1.* + +.include diff --git a/net/py-cloudscraper/distinfo b/net/py-cloudscraper/distinfo new file mode 100644 index 000000000000..891214a51910 --- /dev/null +++ b/net/py-cloudscraper/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1575742950 +SHA256 (VeNoMouS-cloudscraper-1.2.9_GH0.tar.gz) = a16b4b457660b5f8a4eb6336be636eb4f3d05409c9389a06e965d0651dea65e5 +SIZE (VeNoMouS-cloudscraper-1.2.9_GH0.tar.gz) = 396670 diff --git a/net/py-cloudscraper/pkg-descr b/net/py-cloudscraper/pkg-descr new file mode 100644 index 000000000000..e32dbc9d655b --- /dev/null +++ b/net/py-cloudscraper/pkg-descr @@ -0,0 +1,14 @@ +A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm +Under Attack Mode", or IUAM), implemented with Requests. Cloudflare changes +their techniques periodically, so I will update this repo frequently. + +This can be useful if you wish to scrape or crawl a website protected with +Cloudflare. Cloudflare's anti-bot page currently just checks if the client +supports Javascript, though they may add additional techniques in the future. + +Due to Cloudflare continually changing and hardening their protection page, +cloudscraper requires a JavaScript Engine/interpreter to solve Javascript +challenges. This allows the script to easily impersonate a regular web browser +without explicitly deobfuscating and parsing Cloudflare's Javascript. + +WWW: https://github.com/VeNoMouS/cloudscraper