From 4602fd8f7100eef176429774ad29e83eecd00aa9 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Mon, 9 May 2022 10:52:18 +0300 Subject: [PATCH] youtube-transcript-api: add --- README.org | 1 + youtube-transcript-api.scm | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 youtube-transcript-api.scm diff --git a/README.org b/README.org index 2295cf2..ee89873 100644 --- a/README.org +++ b/README.org @@ -16,6 +16,7 @@ I'll probably push what I can upstream when I figure Guix out. | [[https://github.com/alfredopalhares/openvpn-update-resolv-conf][openvpn-update-resolv-conf]] | OK | Just watch out for $PATH if launched from OpenVPN | | [[https://github.com/fdw/rofimoji/][rofimoji]] | OK | But I had to create setup.py myself | | [[https://github.com/deajan/osync][osync]] | Works | Requires shell commands as propagated-inputs | +| [[https://github.com/jdepoix/youtube-transcript-api][youtube-transcript-api]] | Works | Tests fail | | [[https://github.com/latex-lsp/texlab/][texlab]] | Works | Installation from binaries | | [[https://gohugo.io/][hugo]] | Works | Installation from binaries | | [[https://www.nushell.sh/][nushell]] | Works | Installation from binaries (Guix version is outdated) | diff --git a/youtube-transcript-api.scm b/youtube-transcript-api.scm new file mode 100644 index 0000000..40d47b4 --- /dev/null +++ b/youtube-transcript-api.scm @@ -0,0 +1,30 @@ +(define-module (youtube-transcript-api) + #:use-module (guix download) + #:use-module (guix build-system python) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages python-web)) + +(define-public python-youtube-transcript-api + (package + (name "python-youtube-transcript-api") + (version "0.4.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "youtube_transcript_api" version)) + (sha256 + (base32 "1xhbivz2m8fyznsmq8k8i133lidjqm4kjgnlq3drbzkx73hnj3fa")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) + (propagated-inputs (list python-requests)) + (home-page "https://github.com/jdepoix/youtube-transcript-api") + (synopsis + "This is an python API which allows you to get the transcripts/subtitles for a given YouTube video. It also works for automatically generated subtitles, supports translating subtitles and it does not require a headless browser, like other selenium based solutions do!") + (description + "This is an python API which allows you to get the transcripts/subtitles for a +given YouTube video. It also works for automatically generated subtitles, +supports translating subtitles and it does not require a headless browser, like +other selenium based solutions do!") + (license license:expat)))