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

[ARD:mediathek] ERROR: Unable to extract media id #18441

Closed
5 of 9 tasks
w4grfw opened this issue Dec 7, 2018 · 3 comments
Closed
5 of 9 tasks

[ARD:mediathek] ERROR: Unable to extract media id #18441

w4grfw opened this issue Dec 7, 2018 · 3 comments

Comments

@w4grfw
Copy link

w4grfw commented Dec 7, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.12.03. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

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

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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
$ python -m youtube_dl --verbose --ignore-config https://www.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--ignore-config', u'https://www.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.12.03
[debug] Git HEAD: 8c5879715
[debug] Python version 2.7.15+ (CPython) - Linux-4.18.0-12-generic-x86_64-with-Ubuntu-18.10-cosmic
[debug] exe versions: ffmpeg 4.0.2-2, ffprobe 4.0.2-2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[ARD:mediathek] Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU: Downloading webpage
ERROR: Unable to extract media 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 "youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "youtube_dl/extractor/ard.py", line 219, in _real_extract
    r'/play/(?:config|media)/(\d+)', webpage, 'media id')
  File "youtube_dl/extractor/common.py", line 983, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract media 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.
@back-to
Copy link

back-to commented Dec 7, 2018

the issue is that you can get different website versions

old Website (you might get redirected, but it is still available)
https://www.ardmediathek.de/tv/Dokumentarfilm/Das-Salz-der-Erde-Sebasti%C3%A3o-Salgado-im/SWR-Fernsehen/Video?bcastId=1105036&documentId=57927466

new Website (won't work if you can open the old Website, might work with new cookies)
https://www.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/

beta Website
https://beta.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/

the new website is only supported with beta.ardmediathek.de

https://github.com/rg3/youtube-dl/blob/8c5879715f4d979b83c49d44a9094307247097ba/youtube_dl/extractor/ard.py#L295-L298

but it requires a name after the video_id for youtube-dl
you can just use something random as (?P<display_id>[^/?#]+) is not needed
see example below

also Livestreams are not supported with the current regex


example beta Website with random display_id for youtube-dl

$ youtube-dl "https://beta.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/x" -v -F
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://beta.ardmediathek.de/ard/player/Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU/x', '-v', '-F']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.12.03
[debug] Git HEAD: 8c5879715
[debug] Python version 3.7.1 (CPython) - Linux
[debug] exe versions: ffmpeg n4.1, ffprobe n4.1, rtmpdump 2.4
[debug] Proxy map: {}
[ARDBetaMediathek] x: Downloading webpage
[ARDBetaMediathek] Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU: Downloading m3u8 information
[info] Available formats for Y3JpZDovL3N3ci5kZS9hZXgvbzEwNzE5MTU:
format code  extension  resolution note
hls-56       mp4        audio only   56k , mp4a.40.2
hls-185      mp4        320x180     185k , avc1.66.30, mp4a.40.2
hls-323      mp4        480x270     323k , avc1.66.30, mp4a.40.2
hls-613      mp4        512x288     613k , avc1.77.30, mp4a.40.2
hls-1192     mp4        640x360    1192k , avc1.77.30, mp4a.40.2
hls-1973     mp4        960x540    1973k , avc1.77.30, mp4a.40.2
hls-3768     mp4        1280x720   3768k , avc1.64001f, mp4a.40.2
hls-6692     mp4        1920x1080  6692k , avc1.64001f, mp4a.40.2
http-0       mp4        unknown    
http-1       mp4        unknown    
http-2       mp4        unknown    
http-3       mp4        unknown    (best)

@w4grfw
Copy link
Author

w4grfw commented Dec 7, 2018

Yes that, works: change hostname in url from www.ardmediathek.de to beta.ardmediathek.de and append random character if url ends with /

so, should i close this issue, because we have to wait till ardmediathek becomes stable or should i leave this open?

@goggle
Copy link
Contributor

goggle commented Dec 8, 2018

@w4grfw Keep it open as long as the issue persists.
@back-to described a good explanation of the issue. His workaround might be helpful for other people and future changes for the information extractor.

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

No branches or pull requests

3 participants