1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, requests
6, requests-toolbelt
7, pyparsing
8}:
9
10buildPythonPackage rec {
11 pname = "cloudscraper";
12 version = "1.2.65";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-vwH5sSA9rFrnFO4zIvjloYXSNWK5Vn1rODO74vPWvEE=";
20 };
21
22 propagatedBuildInputs = [
23 requests
24 requests-toolbelt
25 pyparsing
26 ];
27
28 # The tests require several other dependencies, some of which aren't in
29 # nixpkgs yet, and also aren't included in the PyPI bundle. TODO.
30 doCheck = false;
31
32 pythonImportsCheck = [
33 "cloudscraper"
34 ];
35
36 meta = with lib; {
37 description = "Python module to bypass Cloudflare's anti-bot page";
38 homepage = "https://github.com/venomous/cloudscraper";
39 license = licenses.mit;
40 maintainers = with maintainers; [ kini ];
41 };
42}