2018-12-24 10:42:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
2019-07-01 20:32:16 +01:00
|
|
|
, setuptools_scm
|
2019-09-11 05:52:49 +01:00
|
|
|
, setuptools
|
2018-12-24 10:42:06 +00:00
|
|
|
, requests
|
|
|
|
, lxml
|
|
|
|
, beautifulsoup4
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snscrape";
|
2020-06-05 18:44:37 +01:00
|
|
|
version = "0.3.2";
|
2018-12-24 10:42:06 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-05 18:44:37 +01:00
|
|
|
sha256 = "ea038827afe439577eb109ebd1b5c481d516d489c624fc3fe6e92ec71ef42be9";
|
2018-12-24 10:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# There are no tests; make sure the executable works.
|
|
|
|
checkPhase = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
snscrape --help
|
|
|
|
'';
|
|
|
|
|
2019-07-01 20:32:16 +01:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
2019-09-11 05:52:49 +01:00
|
|
|
propagatedBuildInputs = [ setuptools requests lxml beautifulsoup4 ];
|
2018-12-24 10:42:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 05:59:09 +01:00
|
|
|
homepage = "https://github.com/JustAnotherArchivist/snscrape";
|
2018-12-24 10:42:06 +00:00
|
|
|
description = "A social networking service scraper in Python";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ivan ];
|
|
|
|
};
|
|
|
|
}
|