pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/youtube-dl youtube-dl: Fix extraction of YouTube J...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e2c579d141f
branches:  trunk
changeset: 441317:5e2c579d141f
user:      leot <leot%pkgsrc.org@localhost>
date:      Sun Nov 01 12:14:48 2020 +0000

description:
youtube-dl: Fix extraction of YouTube JS player URL (and youtube extractor)

Both versions are probably still present because - also without the patch -
after several retries the JS player URL is fetched.

PKGREVISION++

diffstat:

 net/youtube-dl/Makefile                                       |   4 +-
 net/youtube-dl/distinfo                                       |   3 +-
 net/youtube-dl/patches/patch-youtube__dl_extractor_youtube.py |  19 +++++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 409f9af01567 -r 5e2c579d141f net/youtube-dl/Makefile
--- a/net/youtube-dl/Makefile   Sun Nov 01 11:28:44 2020 +0000
+++ b/net/youtube-dl/Makefile   Sun Nov 01 12:14:48 2020 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.215 2020/11/01 10:58:23 leot Exp $
+# $NetBSD: Makefile,v 1.216 2020/11/01 12:14:48 leot Exp $
 
 # XXX: VERSION_DATE can contains also an optional part that indicates
 # XXX: possible same day revisions. PKGNAME preserves that dotted part as is.
 VERSION_DATE=  2020.09.20
 DISTNAME=      youtube-dl-${VERSION_DATE}
 PKGNAME=       ${DISTNAME:S/.//:S/.//}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    net
 MASTER_SITES=  https://youtube-dl.org/downloads/${VERSION_DATE}/
 
diff -r 409f9af01567 -r 5e2c579d141f net/youtube-dl/distinfo
--- a/net/youtube-dl/distinfo   Sun Nov 01 11:28:44 2020 +0000
+++ b/net/youtube-dl/distinfo   Sun Nov 01 12:14:48 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.197 2020/11/01 10:58:23 leot Exp $
+$NetBSD: distinfo,v 1.198 2020/11/01 12:14:48 leot Exp $
 
 SHA1 (youtube-dl-2020.09.20.tar.gz) = 2902fa18c30cc3851d5b7fc2932f3f986432b9ac
 RMD160 (youtube-dl-2020.09.20.tar.gz) = 107732952ec9238057a1bfc3fd7147ce4026f451
@@ -8,4 +8,5 @@
 SHA1 (patch-youtube__dl_extractor_bandcamp.py) = 81855a3f4f8c03f61fe543eb339c0e67bf52682e
 SHA1 (patch-youtube__dl_extractor_la7.py) = e246750808305343227060acdc5a38583ef071e9
 SHA1 (patch-youtube__dl_extractor_rai.py) = 3dbad7852b38e7364a248a5c9851c50cd2ff9b38
+SHA1 (patch-youtube__dl_extractor_youtube.py) = e056cbffa3b99dbeddbbf3e32f14a53513d97b64
 SHA1 (patch-youtube__dl_postprocessor_ffmpeg.py) = f96676170a448d9205d542a7def4beca615a1490
diff -r 409f9af01567 -r 5e2c579d141f net/youtube-dl/patches/patch-youtube__dl_extractor_youtube.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/youtube-dl/patches/patch-youtube__dl_extractor_youtube.py     Sun Nov 01 12:14:48 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-youtube__dl_extractor_youtube.py,v 1.1 2020/11/01 12:14:48 leot Exp $
+
+Update JS player URL to current one.
+
+Via:
+
+ https://github.com/blackjack4494/yt-dlc/pull/35
+
+--- youtube_dl/extractor/youtube.py.orig       2020-09-20 05:29:46.000000000 +0000
++++ youtube_dl/extractor/youtube.py
+@@ -2086,7 +2086,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor
+ 
+                 if cipher:
+                     if 's' in url_data or self._downloader.params.get('youtube_include_dash_manifest', True):
+-                        ASSETS_RE = r'"assets":.+?"js":\s*("[^"]+")'
++                        ASSETS_RE = r'(?:"assets":.+?"js":\s*("[^"]+"))|(?:"jsUrl":\s*("[^"]+"))'
+                         jsplayer_url_json = self._search_regex(
+                             ASSETS_RE,
+                             embed_webpage if age_gate else video_webpage,



Home | Main Index | Thread Index | Old Index