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