diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2021-07-27 09:00:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 09:00:32 -0500 |
commit | 6c154128a7288bdebc53959a298fa4ac22d77898 (patch) | |
tree | aa5763d18e99d5d71586b96d340f7592702503b8 /pkgs | |
parent | ac1cc7bce1194e189bb1dcb2e9980d0bc6b1c5fd (diff) | |
parent | 42c93277173914779537fcbf0a8458e503ab6f5a (diff) |
Merge pull request #131490 from marsam/init-youtube-transcript-api
pythonPackages.youtube-transcript-api: init at 0.4.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/youtube-transcript-api/default.nix | 27 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/youtube-transcript-api/default.nix b/pkgs/development/python-modules/youtube-transcript-api/default.nix new file mode 100644 index 0000000000000..6829df668b2f0 --- /dev/null +++ b/pkgs/development/python-modules/youtube-transcript-api/default.nix @@ -0,0 +1,27 @@ +{ lib, buildPythonPackage, fetchFromGitHub, requests, mock, httpretty, pytestCheckHook }: + +buildPythonPackage rec { + pname = "youtube-transcript-api"; + version = "0.4.1"; + + # PyPI tarball is missing some test files + src = fetchFromGitHub { + owner = "jdepoix"; + repo = "youtube-transcript-api"; + rev = "v${version}"; + sha256 = "1gpk13j1n2bifwsg951gmrfnq8kfxjr15rq46dxn1bhyk9hr1zql"; + }; + + propagatedBuildInputs = [ requests ]; + + checkInputs = [ mock httpretty pytestCheckHook ]; + + pythonImportsCheck = [ "youtube_transcript_api" ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9708579cabc8b..554ede74f071b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9462,6 +9462,8 @@ in { youtube-search = callPackage ../development/python-modules/youtube-search { }; + youtube-transcript-api = callPackage ../development/python-modules/youtube-transcript-api { }; + yowsup = callPackage ../development/python-modules/yowsup { }; yq = callPackage ../development/python-modules/yq { |