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

--proxy option does not work with [crunchyroll] #26456

Open
BlohoJo opened this issue Aug 28, 2020 · 3 comments
Open

--proxy option does not work with [crunchyroll] #26456

BlohoJo opened this issue Aug 28, 2020 · 3 comments

Comments

@BlohoJo
Copy link

@BlohoJo BlohoJo commented Aug 28, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.07.28
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

With proxy (user name / password edited):

E:\USER\temp_ytdl>youtube-dl --verbose --proxy "http://user%40email.com:password@proxy.torguard.org:6060" "https://www.crunchyroll.com/kaiji/episode-1-departure-626467"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--proxy', 'http://user%40email.com:password@proxy.torguard.org:6060', 'https://www.crunchyroll.com/kaiji/episode-1-departure-626467']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-2008ServerR2-6.1.7601-SP1
[debug] exe versions: ffmpeg N-93824-g479a5f644f, ffprobe N-89595-g40d4b13228, rtmpdump 2.4-20151223-gfa8646d-OpenSSL_1.0.2n-x86_64-static
[debug] Proxy map: {'http': 'http://user%40email.com:password@proxy.torguard.org:6060', 'https': 'http://user%40email.com:password@proxy.torguard.org:6060'}
[crunchyroll] 626467: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (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\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\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

Without proxy:

E:\USER\temp_ytdl>youtube-dl --verbose "https://www.crunchyroll.com/kaiji/episode-1-departure-626467"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.crunchyroll.com/kaiji/episode-1-departure-626467']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-2008ServerR2-6.1.7601-SP1
[debug] exe versions: ffmpeg N-93824-g479a5f644f, ffprobe N-89595-g40d4b13228, rtmpdump 2.4-20151223-gfa8646d-OpenSSL_1.0.2n-x86_64-static
[debug] Proxy map: {}
[crunchyroll] 626467: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (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\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\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

I appear to be IP banned from Crunchyroll. That's strange as this is the first time I ever visited the web site. My IP must be in a banned range.

So I can use a proxy to get around this. NordVPN works via HTTPS in Chrome on port 89. TorGuard also works via HTTP in Chrome on port 6060. No problems.

But, youtube-dl appears to not be using the proxy at all, even though the switch was specified.

  • I have used NordVPN in youtube-dl the same way in the past with no issues. (--proxy "http://user%40email.com:password@proxyaddress.com:port"
  • Checked that the .cache folder was deleted from C:\Users\Username\
  • Tried both NordVPN with HTTPS and Torguard with HTTP in youtube-dl, both behave as if proxy isn't even being used.
@BlohoJo
Copy link
Author

@BlohoJo BlohoJo commented Aug 28, 2020

I tried the above download from a computer connected to the Internet on a different ISP, and the download worked without problems in youtube-dl.

@BlohoJo
Copy link
Author

@BlohoJo BlohoJo commented Aug 28, 2020

I tried with youtube-dl version 2020.03.01. This produces a different error:

E:\USER\temp_ytdl>youtube-dl --verbose --proxy "http://user%40email.com:password@proxy.torguard.org:6060" "https://www.crunchyroll.com/kaiji/episode-1-deparure-626467"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--proxy', 'http://user%40email.com:password@proxy.torguard.org:6060', 'https://www.crunchyroll.com/kaiji/episode-1-deparure-626467']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.03.01
[debug] Python version 3.4.4 (CPython) - Windows-2008ServerR2-6.1.7601-SP1
[debug] exe versions: ffmpeg N-93824-g479a5f644f, ffprobe N-89595-g40d4b13228, rtmpdump 2.4-20151223-gfa8646d-OpenSSL_1.0.2n-x86_64-static
[debug] Proxy map: {'https': 'http://user%40email.com:password@proxy.torguard.org:6060', 'http': 'http://user%40email.com:password@proxy.torguard.org:6060'}
[crunchyroll] 626467: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 407: Proxy Authentication Required (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\tmpavop71lg\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpavop71lg\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

So there is definitely something going on with how the proxy is handled. In the above, at least it is trying to use the proxy, but it appears it does not parse the user name and password correctly, or at all. My password has no symbols in it (only letters and numbers), the only symbol is the @ in the email, but using %40 has worked with youtube-dl in the past.

@BlohoJo
Copy link
Author

@BlohoJo BlohoJo commented Aug 28, 2020

I have finally gotten it to work using SOCKS5 and cookies.txt exported from Chrome after playing the video in the browser:

youtube-dl --proxy "socks5://user%40email.com:password@proxy.torguard.org:1080" --cookies cookies.txt --all-subs "https://www.crunchyroll.com/kaiji/episode-1-deparure-626467"

However, the above line only works "sometimes". If I move the successful download and try the above line again, sometimes I get:

ERROR: Unable to download webpage: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host> (caused by URLError(ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None),))

Other times I get the 403: Forbidden error.

If I just keep trying and trying again, eventually it works.

I get no such problems in a browser.

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