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 always raises error #11716

Closed
Khang-NT opened this issue Jan 14, 2017 · 2 comments
Closed

--proxy always raises error #11716

Khang-NT opened this issue Jan 14, 2017 · 2 comments

Comments

@Khang-NT
Copy link
Contributor

@Khang-NT Khang-NT commented Jan 14, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.01.14

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

$ youtube-dl -v --proxy http://188.166.168.57:3128 FC1Y4Dg-T9o
[youtube] FC1Y4Dg-T9o: Downloading webpage
ERROR: Unable to download webpage: <urlopen error Tunnel connection failed: 400 Bad Request> (caused by URLError(OSError('Tunnel connection failed: 400 Bad Request',),))
Khangs-MacBook-Air:~ khangnt$ youtube-dl --proxy http://188.166.168.57:3128 FC1Y4Dg-T9o --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--proxy', 'http://188.166.168.57:3128', 'FC1Y4Dg-T9o', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.01.14
[debug] Python version 3.5.2 - Darwin-16.3.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.1.3, ffprobe 3.1.3
[debug] Proxy map: {'http': 'http://188.166.168.57:3128', 'https': 'http://188.166.168.57:3128'}
[youtube] FC1Y4Dg-T9o: Downloading webpage
ERROR: Unable to download webpage: <urlopen error Tunnel connection failed: 400 Bad Request> (caused by URLError(OSError('Tunnel connection failed: 400 Bad Request',),))
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 406, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 466, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 484, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/youtube_dl/utils.py", line 1047, in https_open
    req, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1256, in do_open
    raise URLError(err)

Addition information:

I'm using proxy to escape from "Region restriction" with YouTube video, I have list tens of proxy (all tested working), use all of proxy I have, but I just receive one error: Tunnel connection failed: 400 Bad Request.

{Note: The proxy in verbose log may be dead)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 14, 2017

Most likely all your proxies are dead.

PS C:\dev\youtube-dl\master> py -3.5 .\youtube_dl\__main__.py BaW_jenozKc -v --proxy http://127.0.0.1:8118
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['BaW_jenozKc', '-v', '--proxy', 'http://127.0.0.1:8118']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.01.14
[debug] Git HEAD: b80e2eb
[debug] Python version 3.5.2 - Windows-10-10.0.10240-SP0
[debug] exe versions: ffmpeg N-81192-g04da20e, ffprobe N-81192-g04da20e, rtmpdump 2.4
[debug] Proxy map: {'http': 'http://127.0.0.1:8118', 'https': 'http://127.0.0.1:8118'}
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading video info webpage
[youtube] BaW_jenozKc: Extracting video information
[youtube] BaW_jenozKc: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r3---sn-vgqsrn7l.googlevideo.com/videoplayback?id=05a5bf8de9e8cca7&itag=137&source=youtube&requiressl=yes&nh=IgpwcjAzLm9yZDEyKgkxMjcuMC4wLjE&initcwndbps=2842500&ms=au&mv=m&pl=19&mn=sn-vgqsrn7l&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=2208750&lmt=1387961822987808&dur=9.800&upn=7JSCLa4lwMA&signature=887F0FA8207FCA135956C30F2B4EDBDB9FD97A08.9584650392B092A63629F90F370D72AE7737A893&key=dg_yt0&mt=1484408148&ip=64.113.32.29&ipbits=0&expire=1484429928&sparams=ip,ipbits,expire,id,itag,source,requiressl,nh,initcwndbps,ms,mv,pl,mn,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: youtube-dl test video ''_ä↭𝕐-BaW_jenozKc.f137.mp4
[download]  11.8% of 2.11MiB at 151.02KiB/s ETA 00:12
@dstftw dstftw closed this Jan 14, 2017
@mh4ck
Copy link

@mh4ck mh4ck commented Nov 23, 2019

I have the same problem, i can access every page with the proxy but get 400 bad request on youtube.

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