The officially official Devuan Forum!

You are not logged in.

#1 2023-02-21 12:13:28

alexkemp
Member
Registered: 2018-05-14
Posts: 314  

[SOLVED] yt-dlp updated on GitHub but not Devuan

Starting (for me) yesterday the YouTube downloader yt-dlp gives the error:

ERROR: [youtube] 72FQIV-jpEk: Unable to extract uploader id;
 please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= ,
 filling out the appropriate issue template.

Looking at the GitHub site it has been fixed 5 days ago, and that fix is for this specific error:-

Latest wrote:

yt-dlp 2023.02.17
Latest
4 days ago

The version for Chimaera from Backports is considerably older:

$ apt search yt-dlp
Sorting... Done
Full Text Search... Done
yt-dlp/stable-backports,now 2023.01.06-1~bpo11+1 all [installed]
  downloader of videos from YouTube and other sites
$ yt-dlp --version
2023.01.06

Offline

#2 2023-02-21 12:56:47

alexkemp
Member
Registered: 2018-05-14
Posts: 314  

Re: [SOLVED] yt-dlp updated on GitHub but not Devuan

The fix recommended at #6247 is:-

diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index 95ca52b3a..4dde4bbaa 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -4120,7 +4120,7 @@ def is_bad_format(fmt):
             'thumbnail': traverse_obj(original_thumbnails, (-1, 'url')),
             'description': video_description,
             'uploader': get_first(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),
             'uploader_url': owner_profile_url,
             'channel_id': channel_id,
             'channel_url': format_field(channel_id, None, 'https://www.youtube.com/channel/%s'),

I could not find the relevant code at line 4124, but did find it lower down higher up:

$ cd /usr/lib/python3/dist-packages/yt_dlp/extractor/
$ fgrep -n "'uploader_id': self._search_regex" youtube.py
4049:            'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,

Since I have zero experience with either creating or using diff files, I decided on a short & dirty fix: edit it directly:

$ sudo cp youtube.py youtube.py.2023.01.06
$ sudo nano youtube.py
$ fgrep "'uploader_id': self._search_regex" youtube.py -B 1
            # def is_bad_format(fmt):
            # '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),

The above now works fine for me.

Last edited by alexkemp (2023-02-21 15:29:01)

Offline

#3 2023-02-21 13:42:50

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,459  

Re: [SOLVED] yt-dlp updated on GitHub but not Devuan

I didn't know yt-dlp was in the repo. The backports version is the same as what's in ceres/sid now, so there's nothing new to backport.

I keep a copy of the script in my user's bin/ and I have a script to wget the latest version from git. Apparently, that script is not needed - you should be able to run yt-dlp -U to update to the latest.

Offline

#4 2023-02-21 19:31:08

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 613  

Re: [SOLVED] yt-dlp updated on GitHub but not Devuan

fsmithred wrote:

I didn't know yt-dlp was in the repo. The backports version is the same as what's in ceres/sid now, so there's nothing new to backport.

I keep a copy of the script in my user's bin/ and I have a script to wget the latest version from git. Apparently, that script is not needed - you should be able to run yt-dlp -U to update to the latest.

I tried to Update from the yt-dlp -U but if you installed via apt, you'll be advised to upgrade with apt.

I un-installed it with apt and then upgraded to the git version.

Thank you


pic from 1993, new guitar day.

Offline

#5 2023-02-21 19:39:24

thierrybo
Member
Registered: 2017-11-11
Posts: 107  

Re: [SOLVED] yt-dlp updated on GitHub but not Devuan

2023.02.17 arrives 3 days ago in Debian unstable, then it should be in 10 days in Debian Testing, then 10/15 days after as a backport, seeing what have be done for the previous backport:

[2023-02-18] Accepted yt-dlp 2023.02.17-1 (source) into unstable (Unit 193)
[2023-02-01] Accepted yt-dlp 2023.01.06-1~bpo11+1 (source) into bullseye-backports (Unit 193)
[2023-01-19] yt-dlp 2023.01.06-1 MIGRATED to testing (Debian testing watch)
[2023-01-19] yt-dlp 2023.01.06-1 MIGRATED to testing (Debian testing watch)
[2023-01-07] Accepted yt-dlp 2023.01.06-1 (source) into unstable (Unit 193)
[2023-01-03] Accepted yt-dlp 2023.01.02-1 (source) into unstable (Unit 193)
[2022-11-16] Accepted yt-dlp 2022.11.11-1~bpo11+1 (source) into bullseye-backports (Unit 193)

Offline

#6 2023-02-22 15:25:56

hunter0one
Member
Registered: 2021-12-31
Posts: 68  

Re: [SOLVED] yt-dlp updated on GitHub but not Devuan

I just install it via Pip to keep up with the latest version. Pip should be installed if you have Python.

Offline

Board footer