1{ lib, buildPythonPackage, fetchFromGitHub, requests, mock, httpretty, pytestCheckHook }: 2 3buildPythonPackage rec { 4 pname = "youtube-transcript-api"; 5 version = "0.4.2"; 6 7 # PyPI tarball is missing some test files 8 src = fetchFromGitHub { 9 owner = "jdepoix"; 10 repo = "youtube-transcript-api"; 11 rev = "v${version}"; 12 sha256 = "04x7mfp4q17w3n8dnklbxblz22496g7g4879nz0wzgijg3m6cwlp"; 13 }; 14 15 propagatedBuildInputs = [ requests ]; 16 17 checkInputs = [ mock httpretty pytestCheckHook ]; 18 19 pythonImportsCheck = [ "youtube_transcript_api" ]; 20 21 meta = with lib; { 22 description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video"; 23 homepage = "https://github.com/jdepoix/youtube-transcript-api"; 24 license = licenses.mit; 25 maintainers = [ maintainers.marsam ]; 26 }; 27}