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

[rtp] player_config regex #15099

Closed
edgarcosta opened this issue Dec 28, 2017 · 1 comment
Closed

[rtp] player_config regex #15099

edgarcosta opened this issue Dec 28, 2017 · 1 comment

Comments

@edgarcosta
Copy link

@edgarcosta edgarcosta commented Dec 28, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.12.23

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Issue

RTP change the way it setups the player, and youtube-dl fails to find the JSON to parse.

youtube-dl.exe -v http://www.rtp.pt/play/p3023/telejornal
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.rtp.pt/play/p3023/telejornal']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.12.23
[debug] Python version 3.4.4 - Windows-10-10.0.16299
[debug] exe versions: none
[debug] Proxy map: {}
[RTP] telejornal: 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\rg3\tmp27__tkx0\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp27__tkx0\build\youtube_dl\extractor\common.py", line 438, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp27__tkx0\build\youtube_dl\extractor\rtp.py", line 40, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp27__tkx0\build\youtube_dl\extractor\common.py", line 794, 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.
@Tony-il-Capo
Copy link

@Tony-il-Capo Tony-il-Capo commented May 27, 2018

Hi
I have a similar problem with "RTP(Play)"

youtube-dl -F https://www.rtp.pt/play/p4243/mundo-sem-muros
[RTP] mundo-sem-muros: 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.
root@LEDE:~# youtube-dl -e -v https://www.rtp.pt/play/p4243/mundo-sem-muros
[debug] System config: [u'--proxy', u'192.168.2.1:8118', u'--external-downloader', u'/usr/bin/aria2c', u'--external-downloader-args', u'--conf-path=/root/.aria2/aria2.conf', u'-f', u'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best', u'-o', u'/youtube-dl/%(title)s_(%(upload_date)s).%(ext)s', u'--fixup', u'never']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-e', u'-v', u'https://www.rtp.pt/play/p4243/mundo-sem-muros']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.05.18
[debug] Python version 2.7.14 (CPython) - Linux-4.4.50-mips-with-glibc2.0
[debug] exe versions: ffmpeg 3.2.2
[debug] Proxy map: {u'http': u'192.168.2.1:8118', u'https': u'192.168.2.1:8118'}
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 "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 503, in extract
    ie_result = self._real_extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/rtp.py", line 40, in _real_extract
    r'(?s)RTPPLAY\.player\.newPlayer\(\s*(\{.*?\})\s*\)', webpage, 'player config')
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 883, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
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.

Works if i extract media url manually ((browser > inspect element > Network > Media))
I got a link like this https://streaming-ondemand.rtp.pt/nas2.share/h264/512x384/p4243/p4243_1_201805252254265946.mp4Frag1Num0.ts just remove after ".mp4" and you got the link to the video https://streaming-ondemand.rtp.pt/nas2.share/h264/512x384/p4243/p4243_1_201805252254265946.mp4

@remitamine remitamine mentioned this issue Jul 3, 2018
5 of 9 tasks complete
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
2 participants
You can’t perform that action at this time.