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

Error downloading from Discovery Go #23807

Open
lightsout opened this issue Jan 21, 2020 · 2 comments
Open

Error downloading from Discovery Go #23807

lightsout opened this issue Jan 21, 2020 · 2 comments

Comments

@lightsout
Copy link

@lightsout lightsout commented Jan 21, 2020

Checklist

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

T:\youtubedl>youtube-dl.exe -o Gold.Rush.S10E%(episode_number)s.%(title)s.mp4 --cookies T:/youtubedl/cookies.txt --batch-file=batch.txt --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-o', 'Gold.Rush.S10E%(episode_number)s.%(title)s.mp4', '--cookies', 'T:/youtubedl/cookies.txt', '--batch-file=batch.txt', '--verbose']
[debug] Batch file urls: ['https://go.discovery.com/tv-shows/gold-rush/full-episodes/million-dollar-pay-day', 'https://go.discovery.com/tv-shows/gold-rush/full-episodes/nuggets-or-bust']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.01.15
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg N-94066-g18dab6175b, ffprobe N-94066-g18dab6175b
[debug] Proxy map: {}
[Discovery] million-dollar-pay-day: Downloading content JSON metadata
ERROR: Access to the requested resource path is unauthorized; 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\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\YoutubeDL.py", line 2237, 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
urllib.error.HTTPError: HTTP Error 401: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\discovery.py", line 99, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 892, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 870, in _download_json_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 660, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 645, in _request_webpage
youtube_dl.utils.ExtractorError: 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.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\YoutubeDL.py", line 2237, 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
urllib.error.HTTPError: HTTP Error 401: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\discovery.py", line 99, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 892, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 870, in _download_json_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 660, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 645, in _request_webpage
youtube_dl.utils.ExtractorError: 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp43n_zyg3\build\youtube_dl\extractor\discovery.py", line 115, in _real_extract
youtube_dl.utils.ExtractorError: Access to the requested resource path is unauthorized; 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.

Description

Getting an error when downloading from discovery. It seems to be hit and miss, sometimes it works and sometimes not. I have a cable account and am using cookies.

@yemaozitw
Copy link

@yemaozitw yemaozitw commented Feb 3, 2020

On Discovery's sites you need to save cookies.txt right before each download. The token expires after about 15 minutes.

@Hemps38
Copy link

@Hemps38 Hemps38 commented Feb 10, 2020

I'm stuck on the saving cookies before each download part, I have links in .txt file

Here's my script, ideas to improve it OR make it save cookies before each download?

@echo off
cls
:start
:SET_SCRIPT_VARIABLES
SET YTDL=C:\youtubedl\youtube-dl.exe
SET NCCV=C:\youtubedl\ChromeCookiesView.exe
SET DDIR=C:\youtubedl
SET CFIL=%DDIR%\cookies.txt

:GET_COOKIES
IF EXIST %NCCV% (
IF EXIST %DDIR% (
START /WAIT "ChromeCookiesView" "%NCCV%" /scookiestxt "%CFIL%"
)
)
:FIX_COOKIES
IF EXIST "%CFIL%" (
COPY "%CFIL%" "%TEMP%\cookies.txt"
ECHO # Netscape HTTP Cookie File>"%CFIL%"
TYPE "%TEMP%\cookies.txt">>"%CFIL%"
DEL "%TEMP%\cookies.txt"
)

youtube-dl.exe -i --force-ipv4 --hls-prefer-native --download-archive downloaded.txt --restrict-filenames --cookies cookies.txt --continue --no-check-certificate --verbose -o "C:\MyVideos/%%(series)s/%%(season)s/%%(episode_number)s.%%(season_number) - %%(series)s.%%(title)s.%%(ext)s" -a, --batch-file diy.txt

goto start

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
4 participants
You can’t perform that action at this time.