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

Where do I enter --cookies FILE command? #17389

Closed
hasnogaems opened this issue Aug 30, 2018 · 7 comments
Closed

Where do I enter --cookies FILE command? #17389

hasnogaems opened this issue Aug 30, 2018 · 7 comments

Comments

@hasnogaems
Copy link

@hasnogaems hasnogaems commented Aug 30, 2018

Here is command that not working because It premium content and required cookie, question is where should I put the command?
youtube-dl.exe --ffmpeg-location C:\Users\anonimous\Desktop\ffmpeg\ffmpeg-20180404-2accdd3-win64-static\ffmpeg-20180404-2accdd3-win64-static\bin --hls-prefer-native https://cdn-video.pvgna.com/782/original-1487910128-1080p/1080p.m3u8

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 30, 2018

Same place you enter any other command. Note that passing cookies alone does not guarantee it will work in the first place.

@dstftw dstftw closed this Aug 30, 2018
@hasnogaems
Copy link
Author

@hasnogaems hasnogaems commented Aug 30, 2018

@dstftw can you write in it in my command plese? It is so confusing I dunno what slash use this \ or this / even.
For example my youtube dl is in F:\twitch download\bin and I put there my cookie.txt
So what my command youtube-dl.exe --ffmpeg-location C:\Users\anonimous\Desktop\ffmpeg\ffmpeg-20180404-2accdd3-win64-static\ffmpeg-20180404-2accdd3-win64-static\bin --hls-prefer-native https://cdn-video.pvgna.com/782/original-1487910128-1080p/1080p.m3u8 should be to include this cookie? So far Im fail with this error
F:\twitch download\bin>youtube-dl.exe --ffmpeg-location C:\Users\anonimous\Deskt
op\ffmpeg\ffmpeg-20180404-2accdd3-win64-static\ffmpeg-20180404-2accdd3-win64-sta
tic\bin --cookies F:/twitch download/bin/cookies.txt --hls-prefer-native https:/
/cdn-video.pvgna.com/782/original-1487910128-1080p/1080p.m3u8
WARNING: The url doesn't specify the protocol, trying with http
[generic] cookies: Requesting header
WARNING: Could not send HEAD request to http://download/bin/cookies.txt: <urlope
n error [Errno 11004] getaddrinfo failed>
[generic] cookies: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 11004] getaddrinfo fail
ed> (caused by URLError(gaierror(11004, 'getaddrinfo failed'),))

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 30, 2018

You have spaces in your path. Always put paths in quotes.

@hasnogaems
Copy link
Author

@hasnogaems hasnogaems commented Aug 30, 2018

@dstftw if I put it in quotes, spaces is not a problem anymore? And the --cookies command itself I put in valid order?

@hasnogaems
Copy link
Author

@hasnogaems hasnogaems commented Aug 30, 2018

@dstftw now this error
F:\twitch download\bin>youtube-dl.exe --ffmpeg-location C:\Users\anonimous\Deskt
op\ffmpeg\ffmpeg-20180404-2accdd3-win64-static\ffmpeg-20180404-2accdd3-win64-sta
tic\bin --cookies "F:/twitch download/bin/cookies.txt" --hls-prefer-native https
://cdn-video.pvgna.com/782/original-1487910128-1080p/1080p.m3u8
[generic] 1080p: Requesting header
WARNING: Could not send HEAD request to https://cdn-video.pvgna.com/782/original
-1487910128-1080p/1080p.m3u8: HTTP Error 403: Forbidden
[generic] 1080p: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPErro
r()); please report this issue on https://yt-dl.org/bug . Make sure you are usin
g the latest version; type youtube-dl -U to update. Be sure to call youtube-dl
with the --verbose flag and include its complete output.

@hasnogaems
Copy link
Author

@hasnogaems hasnogaems commented Aug 30, 2018

@dstftw now when I put path in ' ' instead of " " I get this hardcore error. I need to update or something?
`F:\twitch download\bin>youtube-dl.exe --ffmpeg-location C:\Users\anonimous\Deskt
op\ffmpeg\ffmpeg-20180404-2accdd3-win64-static\ffmpeg-20180404-2accdd3-win64-sta
tic\bin --cookies 'F:/twitch download/bin/cookies.txt' --hls-prefer-native https
://cdn-video.pvgna.com/782/original-1487910128-1080p/1080p.m3u8
WARNING: The url doesn't specify the protocol, trying with http
[generic] cookies: Requesting header
WARNING: Could not send HEAD request to http://download/bin/cookies.txt': <urlop
en error [Errno 11004] getaddrinfo failed>
[generic] cookies: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 11004] getaddrinfo fail
ed> (caused by URLError(gaierror(11004, 'getaddrinfo failed'),))
Traceback (most recent call last):
File "C:\Python\Python34\lib\urllib\request.py", line 1183, in do_open
File "C:\Python\Python34\lib\http\client.py", line 1137, in request
File "C:\Python\Python34\lib\http\client.py", line 1182, in _send_request
File "C:\Python\Python34\lib\http\client.py", line 1133, in endheaders
File "C:\Python\Python34\lib\http\client.py", line 963, in _send_output
File "C:\Python\Python34\lib\http\client.py", line 898, in send
File "C:\Python\Python34\lib\http\client.py", line 871, in connect
File "C:\Python\Python34\lib\socket.py", line 498, in create_connection
File "C:\Python\Python34\lib\socket.py", line 537, in getaddrinfo
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\extractor\common.py", line 503, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 2177, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 464, in open
File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\utils.py", line 930, in http_open
File "C:\Python\Python34\lib\urllib\request.py", line 1185, in do_open
urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 776, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\extractor\common.py", line 434, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\extractor\generic.py", line 2043, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\extractor\common.py", line 512, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download webpage: <urlopen error [Err
no 11004] getaddrinfo failed> (caused by URLError(gaierror(11004, 'getaddrinfo f
ailed'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl_init_.py", line 455, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 1967, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 787, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 848, in process_ie_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 799, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 604, in report_error
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 574, in trouble
youtube_dl.utils.DownloadError: ERROR: Unable to download webpage: <urlopen erro
r [Errno 11004] getaddrinfo failed> (caused by URLError(gaierror(11004, 'getaddr
info failed'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 19, in
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl_init_.py", line 465, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl_init_.py", line 458, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\bu
ild\youtube_dl\YoutubeDL.py", line 545, in exit
File "C:\Python\Python34\lib\http\cookiejar.py", line 2068, in save
OSError: [Errno 22] Invalid argument: "'F:/twitch"`

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 30, 2018

Maybe you'll finally start reading my posts?

Note that passing cookies alone does not guarantee it will work in the first place.

@ytdl-org ytdl-org locked and limited conversation to collaborators Aug 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.