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.71";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-QpxuiqaRbVutXIperFDz6lPJrCJhb2yyGxjcxxUX0NM=";
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 changelog = "https://github.com/VeNoMouS/cloudscraper/releases/tag/${version}";
40 license = licenses.mit;
41 maintainers = with maintainers; [ kini ];
42 };
43}