2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2021-01-15 22:18:51 +00:00
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
|
|
|
, pyparsing
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cloudscraper";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.2.60";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-DTQTsv/59895UTsMmqxYtSfFosUWPRx8wMT4zKHQ9Oc=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
|
|
|
|
# The tests require several other dependencies, some of which aren't in
|
|
|
|
# nixpkgs yet, and also aren't included in the PyPI bundle. TODO.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cloudscraper"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-03-30 09:31:56 +00:00
|
|
|
description = "Python module to bypass Cloudflare's anti-bot page";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://github.com/venomous/cloudscraper";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kini ];
|
|
|
|
};
|
|
|
|
}
|