[packages/youtube-dl] Add extract-uploader.patch; rel 5

mis mis at pld-linux.org
Wed Feb 22 15:11:09 CET 2023


commit 468446c1425f224d3e2ab72bde3c3239c2571162
Author: mis <mistoo at gmail.com>
Date:   Wed Feb 22 15:10:40 2023 +0100

    Add extract-uploader.patch; rel 5

 extract-uploader.patch | 12 ++++++++++++
 youtube-dl.spec        |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/youtube-dl.spec b/youtube-dl.spec
index cd56672..f05ab0d 100644
--- a/youtube-dl.spec
+++ b/youtube-dl.spec
@@ -15,7 +15,7 @@ Summary:	Video extraction utility for YouTube
 Summary(pl.UTF-8):	Narzędzie do wydobywania filmów z YouTube
 Name:		youtube-dl
 Version:	%{ver}
-Release:	4
+Release:	5
 Epoch:		2
 License:	Public Domain
 Group:		Applications/System
@@ -27,6 +27,7 @@ Source1:	%{name}.conf
 # but the author removed his repository, so the url is 404
 # git log -p --reverse pr/10291~3..pr/10291
 Patch0:		10291.diff
+Patch1:		extract-uploader.patch
 URL:		http://youtube-dl.org/
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.6
@@ -116,6 +117,7 @@ Dopełnianie parametrów w zsh dla polecenia youtube-dl.
 %setup -qc
 %{__mv} %{name} .tmp; %{__mv} .tmp/* .
 %patch0 -p1
+%patch1 -p0
 
 %build
 %if %{with python2}
diff --git a/extract-uploader.patch b/extract-uploader.patch
new file mode 100644
index 0000000..4937bd8
--- /dev/null
+++ b/extract-uploader.patch
@@ -0,0 +1,12 @@
+# based on https://github.com/ytdl-org/youtube-dl/issues/31530#issuecomment-1433470254
+--- youtube_dl/extractor/youtube.py~	2021-12-16 19:47:24.000000000 +0100
++++ youtube_dl/extractor/youtube.py	2023-02-22 14:55:31.317701423 +0100
+@@ -1791,7 +1791,7 @@
+                 microformat.get('uploadDate')
+                 or search_meta('uploadDate')),
+             'uploader': video_details['author'],
+-            'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
++            'uploader_id': self._search_regex(r'/(?:channel/|user/|@)([^/?&#]+)', owner_profile_url, 'uploader id', default=None) if owner_profile_url else None,
+             'uploader_url': owner_profile_url,
+             'channel_id': channel_id,
+             'channel_url': 'https://www.youtube.com/channel/' + channel_id if channel_id else None,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/youtube-dl.git/commitdiff/468446c1425f224d3e2ab72bde3c3239c2571162



More information about the pld-cvs-commit mailing list