Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube-dl doesn´t extract from RTP play #26657

Open
Srcbica opened this issue Sep 21, 2020 · 3 comments
Open

Youtube-dl doesn´t extract from RTP play #26657

Srcbica opened this issue Sep 21, 2020 · 3 comments

Comments

@Srcbica
Copy link

@Srcbica Srcbica commented Sep 21, 2020

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.09.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verobse log:

youtube-dl -v https://www.rtp.pt/play/p7636/e492820/os-durrell

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.rtp.pt/play/p7636/e492820/os-durrell']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 2020-09-20-git-ef29e5bf42-essentials_build-www.gyan.dev, ffprobe 2020-09-20-git-ef29e5bf42-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[RTP] e492820: Downloading webpage
ERROR: Unable to extract player config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 532, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\rtp.py", line 37, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 1010, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract player config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

When I run youtube-dl and I tried to download, for example, from this link

youtube-dl https://www.rtp.pt/play/p7636/e492820/os-durrell
this is what appears to me:
[RTP] e492820: Downloading webpage
ERROR: Unable to extract player config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
#23707 and hopefully fixed by #23877.

I've read the previous reports concerning youtube-dl and RTP Play, but since RTP play seems to have been changed in some way on sept 14th, perhaps youtube-dl needs some kind of upgrade.

Thank very much for the helping.

Best regards.

@marado
Copy link

@marado marado commented Sep 26, 2020

@vallovic 's repository supposedly deals correctly with the new changes. However, with them, I am still seeing this (which, I suppose, might mean they made even more changes in the meantime):

$ python3 -m youtube_dl https://www.rtp.pt/play/p7488/a-biblioteca-do-futuro --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.rtp.pt/play/p7488/a-biblioteca-do-futuro', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.14
[debug] Git HEAD: 81fe8e386
[debug] Python version 3.7.5 (CPython) - Linux-5.3.0-64-generic-x86_64-with-Ubuntu-19.10-eoan
[debug] exe versions: ffmpeg 4.1.4-1build2, ffprobe 4.1.4-1build2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[RTP] a-biblioteca-do-futuro: Downloading webpage
ERROR: Unable to extract player config; 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 "/home/marado/github/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/marado/github/youtube-dl/youtube_dl/extractor/common.py", line 531, in extract
    ie_result = self._real_extract(url)
  File "/home/marado/github/youtube-dl/youtube_dl/extractor/rtp.py", line 36, in _real_extract
    'player config'), video_id, js_to_json)
  File "/home/marado/github/youtube-dl/youtube_dl/extractor/common.py", line 1009, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract player config; 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.
@vallovic
Copy link

@vallovic vallovic commented Sep 27, 2020

@marado You're right, they changed something in the meantime: they inserted an extra space where it wasn't supposed to. I've fixed it and already pushed the change to my repo.

@loucurapt
Copy link

@loucurapt loucurapt commented Oct 3, 2020

Hi, I was trying to fix this (with my rather limited knowledge of youtube-dl) before seeing this issue and @vallovic 's repository, but still, here's a possible fix (rtp.py and patch): https://gist.github.com/loucurapt/15e5b5cba1111195075ea0ec89c3fb3b

It has a workaround for that js_to_json bug. I simply remove lines that start with "//" from the JSON before sending it to self._parse_json().

It seems to download videos fine.

Anyone, feel free to use it and push it to youtube-dl!
I just want to see youtube-dl working for RTP Play. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.