1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, requests 5, mock 6, httpretty 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "youtube-transcript-api"; 13 version = "0.5.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "jdepoix"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-oTKvJt6tyv/ESJ5+Io8M8/KnuW4hN2P7w14sldsKwzw="; 23 }; 24 25 propagatedBuildInputs = [ 26 requests 27 ]; 28 29 checkInputs = [ 30 mock 31 httpretty 32 pytestCheckHook 33 ]; 34 35 pythonImportsCheck = [ 36 "youtube_transcript_api" 37 ]; 38 39 meta = with lib; { 40 description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video"; 41 homepage = "https://github.com/jdepoix/youtube-transcript-api"; 42 license = licenses.mit; 43 maintainers = [ maintainers.marsam ]; 44 }; 45}