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 doesn't work with 2014.06.26 #3193

Closed
tkan opened this issue Jul 5, 2014 · 3 comments
Closed

ARD Mediathek doesn't work with 2014.06.26 #3193

tkan opened this issue Jul 5, 2014 · 3 comments
Labels

Comments

@tkan
Copy link

@tkan tkan commented Jul 5, 2014

Trying to access ARD Mediathek on Ubuntu 12.04

sudo youtube-dl -U
>> youtube-dl is up-to-date (2014.06.26)

For exampe this link http://mediathek.daserste.de/sendungen_a-z/21675666_fifa-wm-2014/22226718_mehmet-scholl-das-ist-nicht-mehr-mein-sport-?buchstabe=F throws this error message:

[ARD] 22226718_mehmet-scholl-das-ist-nicht-mehr-mein-sport-: Downloading webpage
WARNING: unable to extract description; please report this issue on http://yt-dl.org/bug
WARNING: unable to extract thumbnail url; please report this issue on http://yt-dl.org/bug
[ARD] 22226718_mehmet-scholl-das-ist-nicht-mehr-mein-sport-: Downloading JSON metadata
ERROR: Failed to download JSON; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 307, in _download_json
    return json.loads(json_string)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 516, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 167, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/ard.py", line 51, in _real_extract
    'http://www.ardmediathek.de/play/media/%s' % video_id, video_id)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 309, in _download_json
    raise ExtractorError('Failed to download JSON', cause=ve)
ExtractorError: Failed to download JSON; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
@dstftw dstftw added the broken-IE label Jul 5, 2014
@tkan
Copy link
Author

@tkan tkan commented Jul 8, 2014

As a quick & dirty workaround:

#!/bin/bash
> ard_mp4.txt
while read line
do
        name=$line
        curl $name | grep "mediaCollection.addMediaStream(1, 2" | cut -d, -f4 | sed -e 's/"//g' | tr -d ' '>> ard_mp4.txt
done < $1
wget -N -c -i ard_mp4.txt

Make executable chmod +x ard.sh and call with:

./ard.sh mediathek-URIs.txt

It will produce ard_mp4.txt and download the files. Be aware, the server does seem to block based on IP range or something; couldn't get this to work on my vServer (--user-agent wouldn't work); worked fine via webhost SSH. Change the last digit after addMediaStream ('2' in this case) for different qualities: 2 = highest, 1= medium, 0 = lowest.

@TRox1972
Copy link
Contributor

@TRox1972 TRox1972 commented Jul 7, 2016

The provided URL doesn't point to any one video, just like the test URL in ard.py. Videos that do link to one video still work, though, like this one

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 9, 2016

Should work fine with latest version.

@dstftw dstftw closed this Jul 9, 2016
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
3 participants
You can’t perform that action at this time.