2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, buildPythonPackage, pytestCheckHook, pytestcov, pytest-mock, fake-useragent, faker, scrapy }:
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scrapy-fake-useragent";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.4.4";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
# PyPi tarball is corrupted
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alecxe";
|
|
|
|
repo = pname;
|
|
|
|
rev = "59c20d38c58c76618164760d546aa5b989a79b8b"; # no tags
|
|
|
|
sha256 = "0yb7d51jws665rdfqkmi077w0pjxmb2ni7ysphj7lx7b18whq54j";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
propagatedBuildInputs = [ fake-useragent faker ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
checkInputs = [ pytestCheckHook scrapy pytestcov pytest-mock ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-18 07:06:33 +00:00
|
|
|
description = "Random User-Agent middleware based on fake-useragent";
|
|
|
|
homepage = "https://github.com/alecxe/scrapy-fake-useragent";
|
2020-10-27 00:29:36 +00:00
|
|
|
license = licenses.mit;
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
}
|