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

HTTP Error 401 when downloading playlist from ufcfightpass.com #25453

Open
chipship opened this issue May 29, 2020 · 1 comment
Open

HTTP Error 401 when downloading playlist from ufcfightpass.com #25453

chipship opened this issue May 29, 2020 · 1 comment

Comments

@chipship
Copy link

@chipship chipship commented May 29, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.05.29
  • 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 issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--write-sub', '--playlist-reverse', '-f', 'bestvideo[height<=?1300][container=mp4_dash]+bestaudio/best[height<=?1300]', '--fragment-retries=infinite', '--username', 'PRIVATE', '--password', 'PRIVATE', 'https://ufcfightpass.com/playlist/1861']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.05.29
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2
[debug] Proxy map: {}
[UFCTV] Logging in
[UFCTV] 1861: Downloading JSON metadata
[download] Downloading playlist: UFC 2005 REPLAYS
[UFCTV] playlist UFC 2005 REPLAYS: Collected 10 video ids (downloading 10 of them)
[download] Downloading video 1 of 10
[UFCTV] 32534: Downloading JSON metadata
[UFCTV] 32534: Downloading JSON metadata
[UFCTV] 32534: Downloading m3u8 information
[UFCTV] 32534: Downloading MPD manifest
[download] UFC 51 - Super Saturday-32534.mp4 has already been downloaded and merged
[download] Downloading video 2 of 10
[UFCTV] 31561: Downloading JSON metadata
[UFCTV] 31561: Downloading JSON metadata
[UFCTV] 31561: Downloading m3u8 information
[UFCTV] 31561: Downloading MPD manifest
[download] TUF 1 Finale - TUF 1 Finale-31561.mp4 has already been downloaded and merged
[download] Downloading video 3 of 10
[UFCTV] 30494: Downloading JSON metadata
[UFCTV] 30494: Downloading JSON metadata
[UFCTV] 30494: Downloading m3u8 information
[UFCTV] 30494: Downloading MPD manifest
[download] UFC 52 - Couture vs Liddell 2-30494.mp4 has already been downloaded and merged
[download] Downloading video 4 of 10
[UFCTV] 30482: Downloading JSON metadata
[UFCTV] 30482: Downloading JSON metadata
[UFCTV] 30482: Downloading m3u8 information
[UFCTV] 30482: Downloading MPD manifest
[debug] Invoking downloader on 'https://dve-streams.akamaized.net/MjAxOQ/Mw/M_TQ/NzE_0NzM/REFTSA/MQ/master.mpd?hdnea=exp=1590785870~acl=/MjAxOQ/Mw/M_TQ/NzE_0NzM/REFTSA/MQ/*~id=39ceb221-d55a-422e-aa34-cdaa59d51bb1~hmac=ad1e3ed84e6c09803dce4dc14f7b09dc9784b3d5c9df31d63a62a01e719bbe55'
[dashsegments] Total fragments: 1155
[download] Destination: UFC 53 - Heavy Hitters-30482.fdash-6.mp4
[download] 100% of 2.42GiB in 42:44
[debug] Invoking downloader on 'https://dve-streams.akamaized.net/MjAxOQ/Mw/M_TQ/NzE_0NzM/REFTSA/MQ/master.mpd?hdnea=exp=1590785870~acl=/MjAxOQ/Mw/M_TQ/NzE_0NzM/REFTSA/MQ/*~id=39ceb221-d55a-422e-aa34-cdaa59d51bb1~hmac=ad1e3ed84e6c09803dce4dc14f7b09dc9784b3d5c9df31d63a62a01e719bbe55'
[dashsegments] Total fragments: 1155
[download] Destination: UFC 53 - Heavy Hitters-30482.fdash-5.m4a
[download] 100% of 108.15MiB in 10:54
[ffmpeg] Merging formats into "UFC 53 - Heavy Hitters-30482.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:UFC 53 - Heavy Hitters-30482.fdash-6.mp4" -i "file:UFC 53 - Heavy Hitters-30482.fdash-5.m4a" -c copy -map "0:v:0" -map "1:a:0" "file:UFC 53 - Heavy Hitters-30482.temp.mp4"
Deleting original file UFC 53 - Heavy Hitters-30482.fdash-6.mp4 (pass -k to keep)
Deleting original file UFC 53 - Heavy Hitters-30482.fdash-5.m4a (pass -k to keep)
[download] Downloading video 5 of 10
[UFCTV] 31195: Downloading JSON metadata
ERROR: Unable to download JSON metadata: 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\ytdl-org\tmpxtvjzx45\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpxtvjzx45\build\youtube_dl\YoutubeDL.py", line 2238, 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

Description

Fails with an HTTP Error 401 when trying to download a playlist, but it only happens after yt-dl finished downloading the previous video on the list.
Notice in the above log there's no problem going through the previously-downloaded videos (1st-3rd out of 10), there's no problem downloading a video which wasn't previously downloaded (4th), the error only comes up with the next one (5th).
Restarting yt-dl with the exact same command will do the same thing - it'll go through the list, skip the now-downloaded video (4th), download the one which yt-dl failed at (5th), and fail with the next one (6th out of 10).
Starting yt-dl with each specific video url instead of playlist url won't have this issue whether running in series or in parallel.
Happens from both ends of the list, as in with and without --playlist-reverse.

I suspect maybe the authentication gets dropped once yt-dl finishes downloading a video for some reason, and yt-dl would have to re-authenticate after every downloaded video in a list?

Edit: Forgot to provide example url:
https://ufcfightpass.com/playlist/1861
It happens with every playlist I tried there.

@chipship
Copy link
Author

@chipship chipship commented Jun 15, 2020

Updated to youtube-dl version 2020.06.06
Same issue.
Can provide verbose log if required but it kinda looks the same.

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.