Page MenuHomeSolus

D12197.id29618.diff
No OneTemporary

D12197.id29618.diff

diff --git a/files/0001-Replace-youtube-dl-with-yt-dlp.patch b/files/0001-Replace-youtube-dl-with-yt-dlp.patch
new file mode 100644
--- /dev/null
+++ b/files/0001-Replace-youtube-dl-with-yt-dlp.patch
@@ -0,0 +1,92 @@
+From 1d7eb4d58f7ca4dd4f87dae46c072bd4021ed381 Mon Sep 17 00:00:00 2001
+From: Thomas Staudinger <Staudi.Kaos@gmail.com>
+Date: Fri, 5 Nov 2021 21:33:02 +0100
+Subject: [PATCH] Replace youtube-dl with yt-dlp
+
+---
+ pafy/backend_internal.py | 2 +-
+ pafy/jsinterp.py | 4 ++--
+ pafy/pafy.py | 10 +++++-----
+ setup.py | 2 +-
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/pafy/backend_internal.py b/pafy/backend_internal.py
+index 9ccdc28..eccc70a 100644
+--- a/pafy/backend_internal.py
++++ b/pafy/backend_internal.py
+@@ -266,7 +266,7 @@ def get_video_info(video_id, callback, newurl=None):
+ """ Return info for video_id. Returns dict. """
+ # TODO: see if there is a way to avoid retrieving the embed page
+ # just for this, or to use it for more. This was coppied from
+- # youtube-dl.
++ # ytp-dlp.
+ embed_webpage = fetch_decode(g.urls['embed'])
+ sts = re.search(r'sts"\s*:\s*(\d+)', embed_webpage).group(1)
+
+diff --git a/pafy/jsinterp.py b/pafy/jsinterp.py
+index 3b0b889..09ac153 100644
+--- a/pafy/jsinterp.py
++++ b/pafy/jsinterp.py
+@@ -1,4 +1,4 @@
+-# Copied from youtube_dl
++# Copied from ytp-dlp
+
+ from __future__ import unicode_literals
+
+@@ -14,7 +14,7 @@ class ExtractorError(Exception):
+
+ def __init__(self, msg, tb=None, expected=False, cause=None, video_id=None):
+ """ tb, if given, is the original traceback (so that it can be printed out).
+- If expected is set, this is a normal error message and most likely not a bug in youtube-dl.
++ If expected is set, this is a normal error message and most likely not a bug in yt-dlp.
+ """
+
+ if video_id is not None:
+diff --git a/pafy/pafy.py b/pafy/pafy.py
+index 7429a7c..c8ea619 100644
+--- a/pafy/pafy.py
++++ b/pafy/pafy.py
+@@ -45,14 +45,14 @@ Pafy = None
+ backend = "internal"
+ if os.environ.get("PAFY_BACKEND") != "internal":
+ try:
+- import youtube_dl
+- backend = "youtube-dl"
++ import yt_dlp
++ backend = "yt-dlp"
+ except ImportError:
+ raise ImportError(
+- "pafy: youtube-dl not found; you can use the internal backend by "
++ "pafy: yt-dlp not found; you can use the internal backend by "
+ "setting the environmental variable PAFY_BACKEND to \"internal\". "
+ "It is not enabled by default because it is not as well maintained "
+- "as the youtube-dl backend.")
++ "as the yt-dlp backend.")
+
+ if os.environ.get("pafydebug") == "1":
+ logging.basicConfig(level=logging.DEBUG)
+@@ -119,7 +119,7 @@ def new(url, basic=True, gdata=False, size=False,
+ if backend == "internal":
+ from .backend_internal import InternPafy as Pafy
+ else:
+- from .backend_youtube_dl import YtdlPafy as Pafy
++ from .backend_yt_dlp import YtdlPafy as Pafy
+
+ return Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts)
+
+diff --git a/setup.py b/setup.py
+index ab3fee2..1b40031 100755
+--- a/setup.py
++++ b/setup.py
+@@ -24,7 +24,7 @@ setup(
+ url="https://github.com/mps-youtube/pafy/",
+ download_url="https://github.com/mps-youtube/pafy/tags",
+ extras_require={
+- 'youtube-dl-backend': ["youtube-dl"],
++ 'yt-dlp-backend': ["ytp-dlp"],
+ },
+ package_data={"": ["LICENSE", "README.rst", "CHANGELOG", "AUTHORS"]},
+ include_package_data=True,
+--
+2.33.1
+
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,6 +1,6 @@
name : python-pafy
version : 0.5.5
-release : 6
+release : 7
source :
- https://github.com/mps-youtube/pafy/releases/download/v0.5.5/pafy-0.5.5.tar.gz : 364f1d1312c89582d97dc7225cf6858cde27cb11dfd64a9c2bab1a2f32133b1e
homepage : https://github.com/mps-youtube/pafy
@@ -10,9 +10,11 @@
description: |
Python library to download YouTube content and retrieve metadata.
builddeps :
- - youtube-dl
+ - yt-dlp
rundeps :
- - youtube-dl
+ - yt-dlp
+setup : |
+ %patch -p1 < $pkgfiles/0001-Replace-youtube-dl-with-yt-dlp.patch
build : |
%python3_setup
install : |
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -3,8 +3,8 @@
<Name>python-pafy</Name>
<Homepage>https://github.com/mps-youtube/pafy</Homepage>
<Packager>
- <Name>Joey Riches</Name>
- <Email>josephriches@gmail.com</Email>
+ <Name>Thomas Staudinger</Name>
+ <Email>Staudi.Kaos@gmail.com</Email>
</Packager>
<License>LGPL-3.0-or-later</License>
<PartOf>programming.python</PartOf>
@@ -49,12 +49,12 @@
</Files>
</Package>
<History>
- <Update release="6">
- <Date>2021-07-28</Date>
+ <Update release="7">
+ <Date>2021-11-05</Date>
<Version>0.5.5</Version>
<Comment>Packaging update</Comment>
- <Name>Joey Riches</Name>
- <Email>josephriches@gmail.com</Email>
+ <Name>Thomas Staudinger</Name>
+ <Email>Staudi.Kaos@gmail.com</Email>
</Update>
</History>
</PISI>
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
Jun 18 2023, 1:37 AM (7 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5857467
Default Alt Text
D12197.id29618.diff (5 KB)

Event Timeline