persepolisdm / persepolis

Persepolis Download Manager is a GUI for aria2.
https://persepolisdm.github.io
GNU General Public License v3.0
6.13k stars 647 forks source link

replacing `youtube-dl` with `yt-dlp` #930

Closed SharafatKarim closed 4 months ago

SharafatKarim commented 1 year ago

System Details:

Issue Description and steps to reproduce:

Extra information

This is the issue of youtube-dl, I guess.

image

If I try to download videos from youtube-dl manually from terminal, same issue occurs reference | bug report on their repository. And it seems yt-dlp working perfectly in this case. Is there any possibility to replace youtube-dl with yt-dlp?

Log message of youtube-dl wtih verbose

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://youtu.be/nLhqfehYPtE?list=RDnLhqfehYPtE', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.11.3 (CPython) - Linux-6.3.9-zen1-1-zen-x86_64-with-glibc2.37
[debug] exe versions: ffmpeg 6.0, ffprobe 6.0, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/youtube_dl/extractor/youtube.py", line 1794, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/youtube_dl/extractor/common.py", line 1012, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
ZoidMonster commented 11 months ago

I'm no programmer by far, but I have the same problem (For the umpteenth time)!

I am using Arch, and there is only a Snap version of yt-dl in the repos which may be the source of the problem, that is if the Persepolis from the Arch repo uses that one. I tried to install yt-dlp instead, but the problem persists.

To be honest, this is indicative of yet another case (correct me if I'm wrong) where developers feel they just have to do their own thing instead of collaborating, (over petty differences or no foresight), and there are way too many Youtube Downloader front and back ends, using different pieces of one or the other, instead of working tightly together to make one great app, that is reliable because they are working together. It's not only extremely frustrating to users which should be the target audience, but also downright sad from a humanities perspective, and it doesn't do anyone any good, and users do want to use and have needs for programs, and so bear with it, well at least until they either give up, or voice their grievances, as I am, because I have yet to get more than a few small sessions of use in a short time (a few days) where Persepolis has ever worked, which is a terrible record for something I would like to use on demand whenever I need it, and not have to spend more time chasing down problems, troubleshooting, reading up on it in forums, and reporting bugs, often only to be asked if I tried what I have tried already, and much more... Keep in mind how many users there are vs developers making software's that have problems that effect them in bad ways.

Technetium1 commented 9 months ago

Can someone try yt-dlp-drop-in as mentioned in the issue above?

SharafatKarim commented 9 months ago

I tried persepolis-git as mentioned in the above chaotic-aur and faced the same issue. image

jvdi commented 9 months ago

@Technetium1 @ZoidMonster @SharafatKarim install persepolisdm from source: before run : sudo python setup.py install for setup persepolisdm from source install all dependency except youtube-dl and install yt-dlp (it's a good alternative for youtube-dl) and change in setup.py : import youtube_dl to import yt_dlp as youtube_dl and in root of cloned source got to /persepolis/scripts/video_finder_addlink.py file and => change : import youtube_dl -> import yt_dlp as youtube_dl then run setup command and now you have persepolisdm with youtube downloader

xiota commented 8 months ago

Doesn't seem to work with youtube-dl, youtube-dl-git, and symlink of yt-dlp to allow python imports as youtube-dl.

The video finder box showed some error with youtube-dl. Empty with youtube-dl and yt-dlp.

ZoidMonster commented 8 months ago

@Technetium1 @ZoidMonster @SharafatKarim install persepolisdm from source...

Ah, I don't think so. I found and installed "Video Downloader", a simple GUI app, and it has worked like a charm without a hiccup ever since. It even recognizes if a video is part of a list and asks if I want to download the single video or all in the list. Persepolis was supposed to do that too, yet never did for me, not even when the URL from the list page.

All I can say is that Persepolis with the browser integration which never worked as described and caused more trouble than not... it is trying to do way more than needed before it can do any of it good and reliably, and that with way more clicks than should be needed, and having to fix it yet once again, with no reason to expect better in sight, would by insane by definition.