2022-04-03 18:54:34 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, mock
|
|
|
|
, httpretty
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "youtube-transcript-api";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "0.4.4";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jdepoix";
|
2022-04-03 18:54:34 +00:00
|
|
|
repo = pname;
|
2021-08-05 21:33:18 +00:00
|
|
|
rev = "v${version}";
|
2022-04-03 18:54:34 +00:00
|
|
|
hash = "sha256-RNPWTgAOwS+tXGLQYyIyka36xS1E1499OAP84aT6m3A=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
httpretty
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"youtube_transcript_api"
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video";
|
|
|
|
homepage = "https://github.com/jdepoix/youtube-transcript-api";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|