yt-dlp: Youtube can be used normally, but youtube cannot be downloaded in system proxy mode, and there is no problem in Tun mode

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

No response

Provide a description that is worded well enough to be understood

youtube can’t download using proxy

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

C:\Users\Administrator>yt-dlp -v https://www.youtube.com/watch?v=NKIydLLjFAA&ab_channel=%E9%9B%B6%E5%BA%A6%E8%A7%A3%E8%AF%B4 --proxy socks5://127.0.0.1:10809
[debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=NKIydLLjFAA']
[debug] Portable config "E:\Tencent\Mplayer\yt-dlp.conf": ['--output', 'E:\\Tencent\\N_m3u8DL-CLI\\Downloads\\%(title)s-%(section_number)s-%(section_title)s.%(ext)s', '--console-title', '--progress-template', 'download-title:%(info.id)s-%(progress.eta)s', '--merge-output-format', 'mp4', '--no-write-subs', '--external-downloader', 'aria2c', '--cookies-from-browser', 'edge', '--embed-thumbnail', '--embed-metadata']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.11.2 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1s  1 Nov 2022)
[debug] exe versions: ffmpeg 2023-03-05-git-912ac82a3c-full_build-www.gyan.dev (setts), ffprobe 2023-03-05-git-912ac82a3c-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[Cookies] Extracting cookies from edge
[debug] Extracting cookies from: "C:\Users\Administrator\AppData\Local\Microsoft\Edge\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\Administrator\AppData\Local\Microsoft\Edge\User Data\Local State"
[Cookies] Extracted 641 cookies from edge
[debug] cookie version breakdown: {'v10': 641, 'other': 0, 'unencrypted': 0}
[debug] Proxy map: {'http': 'http://127.0.0.1:10809', 'https': 'http://127.0.0.1:10809', 'ftp': 'http://127.0.0.1:10809'}
[debug] Loaded 1802 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=NKIydLLjFAA
[youtube] NKIydLLjFAA: Downloading webpage
WARNING: [youtube] Unable to download webpage: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>
[debug] [youtube] Extracted SAPISID cookie
[youtube] NKIydLLjFAA: Downloading android player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (1/3)...
[youtube] NKIydLLjFAA: Downloading android player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (2/3)...
[youtube] NKIydLLjFAA: Downloading android player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (3/3)...
[youtube] NKIydLLjFAA: Downloading android player API JSON
[youtube] NKIydLLjFAA: Downloading iframe API JS
WARNING: [youtube] Unable to download webpage: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>
[youtube] NKIydLLjFAA: Downloading web player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (1/3)...
[youtube] NKIydLLjFAA: Downloading web player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (2/3)...
[youtube] NKIydLLjFAA: Downloading web player API JSON
WARNING: [youtube] <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>. Retrying (3/3)...
[youtube] NKIydLLjFAA: Downloading web player API JSON
WARNING: [youtube] Unable to download API page: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。> (caused by URLError(ConnectionRefusedError(10061, '由于目标计算机积极拒绝,无法连接。', None, 10061, None)))
ERROR: [youtube] NKIydLLjFAA: Unable to download API page: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法 连接。> (caused by URLError(ConnectionRefusedError(10061, '由于目标计算机积极拒绝,无法连接。', None, 10061, None)))
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\youtube.py", line 3963, in _real_extract
  File "yt_dlp\extractor\youtube.py", line 3931, in _download_player_responses
  File "yt_dlp\extractor\youtube.py", line 3648, in _extract_player_responses
  File "yt_dlp\extractor\youtube.py", line 3613, in _extract_player_responses
  File "yt_dlp\extractor\youtube.py", line 3533, in _extract_player_response
  File "yt_dlp\extractor\youtube.py", line 932, in _extract_response
  File "yt_dlp\utils.py", line 6155, in __iter__
  File "yt_dlp\extractor\common.py", line 3734, in _error_or_warning
  File "yt_dlp\utils.py", line 6163, in report_retry
  File "yt_dlp\extractor\youtube.py", line 934, in _extract_response
  File "yt_dlp\extractor\youtube.py", line 610, in _call_api
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 1012, in download_handle
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage

  File "urllib\request.py", line 1348, in do_open
  File "http\client.py", line 1282, in request
  File "http\client.py", line 1328, in _send_request
  File "http\client.py", line 1277, in endheaders
  File "http\client.py", line 1037, in _send_output
  File "http\client.py", line 975, in send
  File "http\client.py", line 1447, in connect
  File "http\client.py", line 941, in connect
  File "socket.py", line 851, in create_connection
  File "socket.py", line 836, in create_connection
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3743, in urlopen
  File "urllib\request.py", line 519, in open
  File "urllib\request.py", line 536, in _open
  File "urllib\request.py", line 496, in _call_chain
  File "yt_dlp\utils.py", line 1555, in https_open
  File "urllib\request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>

'ab_channel' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@suger520HT please try to ping www.youtube.com, you may get the wrong ip like this

image

I have the same problem,too.I can open the website of the youtuber,but just have the above problem.