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

[Crackle] Some TV episodes fail with HTTP 401 #16931

Closed
5 of 9 tasks
raleeper opened this issue Jul 8, 2018 · 7 comments
Closed
5 of 9 tasks

[Crackle] Some TV episodes fail with HTTP 401 #16931

raleeper opened this issue Jul 8, 2018 · 7 comments

Comments

@raleeper
Copy link
Contributor

raleeper commented Jul 8, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.07.04. 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.07.04

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

# youtube-dl -v -F https://www.crackle.com/c/snatch/snatch-official-trailer/2502010
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.crackle.com/c/snatch/snatch-official-trailer/2502010']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.04
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-130-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {}
[Crackle] 2502010: Downloading media JSON as US
[Crackle] 2502010: Downloading media JSON as AU
[Crackle] 2502010: Downloading media JSON as CA
[Crackle] 2502010: Downloading media JSON as AS
[Crackle] 2502010: Downloading media JSON as FM
[Crackle] 2502010: Downloading media JSON as GU
[Crackle] 2502010: Downloading media JSON as MP
[Crackle] 2502010: Downloading media JSON as PR
[Crackle] 2502010: Downloading media JSON as PW
[Crackle] 2502010: Downloading media JSON as MH
[Crackle] 2502010: Downloading media JSON as VI
ERROR: Unable to download media JSON: HTTP Error 401: Unauthorized (caused by HTTPError()); 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.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 598, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

<end of log>

Retry with --no-geo-bypass works:

# youtube-dl -v -F https://www.crackle.com/c/snatch/snatch-official-trailer/2502010 --no-geo-bypass
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.crackle.com/c/snatch/snatch-official-trailer/2502010', u'--no-geo-bypass']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.04
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-130-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {}
[Crackle] 2502010: Downloading media JSON as US
[Crackle] 2502010: Downloading m3u8 information
[Crackle] 2502010: Downloading MPD manifest
[info] Available formats for 2502010:
format code             extension  resolution note
dash-audio_eng=124638   m4a        audio only [en] DASH audio  124k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-video_eng=249000   mp4        640x360    [en] DASH video  249k , mp4_dash container, avc1.640029, video only
dash-video_eng=620000   mp4        852x480    [en] DASH video  620k , mp4_dash container, avc1.640029, video only
dash-video_eng=968000   mp4        852x480    [en] DASH video  968k , mp4_dash container, avc1.640029, video only
dash-video_eng=1490000  mp4        1280x720   [en] DASH video 1490k , mp4_dash container, avc1.640029, video only
dash-video_eng=2278000  mp4        1920x1080  [en] DASH video 2278k , mp4_dash container, avc1.640029, video only
dash-video_eng=3014000  mp4        1920x1080  [en] DASH video 3014k , mp4_dash container, avc1.640029, video only
hls-106                 mp4        192x108     106k , avc1.42000b, 15.0fps, mp4a.40.5
hls-192                 mp4        256x144     192k , avc1.42000c, 15.0fps, mp4a.40.5
hls-360                 mp4        416x234     360k , avc1.42000d, 30.0fps, mp4a.40.5
hls-597                 mp4        704x396     597k , avc1.4d001e, 30.0fps, mp4a.40.5
hls-1027                mp4        896x504    1027k , avc1.4d001f, 30.0fps, mp4a.40.5
hls-2123                mp4        1280x720   2123k , avc1.4d001f, 30.0fps, mp4a.40.5 (best)

This one fails with or without --no-geo-bypass. First without:

# youtube-dl -v -F https://www.crackle.com/c/franklin-and-bash/love-is-the-drug/2505578
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.crackle.com/c/franklin-and-bash/love-is-the-drug/2505578']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.04
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-130-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {}
[Crackle] 2505578: Downloading media JSON as US
[Crackle] 2505578: Downloading media JSON as AU
[Crackle] 2505578: Downloading media JSON as CA
[Crackle] 2505578: Downloading media JSON as AS
[Crackle] 2505578: Downloading media JSON as FM
[Crackle] 2505578: Downloading media JSON as GU
[Crackle] 2505578: Downloading media JSON as MP
[Crackle] 2505578: Downloading media JSON as PR
[Crackle] 2505578: Downloading media JSON as PW
[Crackle] 2505578: Downloading media JSON as MH
[Crackle] 2505578: Downloading media JSON as VI
ERROR: Unable to download media JSON: HTTP Error 401: Unauthorized (caused by HTTPError()); 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.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 598, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Then with:

# youtube-dl -v -F https://www.crackle.com/c/franklin-and-bash/love-is-the-drug/2505578 --no-geo-bypass
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.crackle.com/c/franklin-and-bash/love-is-the-drug/2505578', u'--no-geo-bypass']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.04
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-130-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {}
[Crackle] 2505578: Downloading media JSON as US
[Crackle] 2505578: Downloading media JSON as AU
[Crackle] 2505578: Downloading media JSON as CA
[Crackle] 2505578: Downloading media JSON as AS
[Crackle] 2505578: Downloading media JSON as FM
[Crackle] 2505578: Downloading media JSON as GU
[Crackle] 2505578: Downloading media JSON as MP
[Crackle] 2505578: Downloading media JSON as PR
[Crackle] 2505578: Downloading media JSON as PW
[Crackle] 2505578: Downloading media JSON as MH
[Crackle] 2505578: Downloading media JSON as VI
ERROR: Unable to download media JSON: HTTP Error 401: Unauthorized (caused by HTTPError()); 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.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 598, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Description of your issue, suggested solution and other information

Downloading TV episodes fails with HTTP Error 401 after trying all geo-bypass countries. For some episodes adding --no-geo-bypass helps. All of the movies I tried worked fine. For comparison, here is an example working movie URL
# youtube-dl -v -F https://www.crackle.com/c/the-matrix/the-matrix/2504638

@tylerforesthauser
Copy link

It's not too helpful but the EXACT same issue is happening with me too.

@tylerforesthauser
Copy link

tylerforesthauser commented Aug 15, 2018

I found a very weird workaround. If I open the episode page in my web browser first and then switch over to my Terminal window and execute youtube-dl, it works! Every single time.

Open https://www.sonycrackle.com/my-boys/2505585 and just let the ads start loading. Switch to Terminal and run youtube-dl https://www.sonycrackle.com/my-boys/2505585. Works without issue.

@RedPenguin2
Copy link

@tylerforesthauser TY! Had this error and just did what you stated and the error went away immediately.

@LoopinFool
Copy link

This is a bit of a "me too" post, but also bringing this issue up-to-date with the latest version of youtube-dl.
This issue still exists with version 2019.01.30.1.

For those looking for a workaround (and for the developers' info) - find a much older version of youtube-dl. I'm using 2018.02.03 for crackle downloads. That version does not throw the 401 error and is able to find the m3u8 URLs and continue with the download.
Since some older versions do still work with the current Crackle web servers, I hope this issue isn't too hard to fix and restore this capability to future versions. Plus, I'd rather not have to continue to keep around a different executable (I called it crackle-dl) just for this purpose.

Here's sample output for a current Crackle movie with version 2019.01.30.1:
youtube-dl --verbose --get-url --no-geo-bypass https://www.crackle.com/watch/3744/2506613
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--get-url', '--no-geo-bypass', 'https://www.crackle.com/watch/3744/2506613']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.01.30.1
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.1, ffprobe 4.1, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: Unable to download media JSON: HTTP Error 401: Unauthorized (caused by HTTPError()); 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.
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp36zpl0n4\build\youtube_dl\extractor\common.py", line 605, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp36zpl0n4\build\youtube_dl\YoutubeDL.py", line 2215, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

@RedPenguin2
Copy link

RedPenguin2 commented Jan 30, 2019

@LoopinFool TY! I read in another issues on here or actually may have been somewhere else that the older version works better when problems like this occur.

I was worried though with the site redesign that an older version may not work and also was concerned when I "sniffed" Crackle, I was getting "widevine" URLs, and was like, hopefully Crackle didn't lock everything down.

@RedPenguin2
Copy link

RedPenguin2 commented Jan 30, 2019

Just to add to @LoopinFool's post, this for a fact works.

Noticed you have to remove "sony" from the URL as if you put a "sonycrackle.com" URL in, youtube-dl will say "Unsupported URL", but works fine changing it to the old "crackle.com".

@LoopinFool
Copy link

Yes @RedPenguin2 is correct. I forgot about that detail, but did show it in my example of a failed download. That same URL I posted works right now with on old build of youtube-dl but it does require the old domain name.
That's another reason I'm hoping this gets fixed in a future build. Sony could halt their API support at the old domain at any time.

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

5 participants
@tylerforesthauser @LoopinFool @RedPenguin2 @raleeper and others