proxy error downloads video anyway
See original GitHub issueChecklist
- I’m reporting a bug unrelated to a specific site
- I’ve verified that I’m running yt-dlp version 2022.03.08.1. (update instructions)
- 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. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
Description
I wanted the audio to a YT video at work. due to controversial paired gif, the video is age restricted to the network members.
after some testing I have concluded that it is NOT a fault of the proxy and rather a fault of yt-dlp.
NOTE: I assumed curl proxy syntax for yt-dlp
using the following command downloads the video over the non proxy internet after attempting an HTTP proxy connection.
yt-dlp "*video url*" --geo-verification-proxy socks://localhost:9050 --proxy socks://localhost:9050 -x
note that I asked for a SOCKS connection
proxy logs the event when this happens
Mar 15 11:22:55.000 [warn] Socks version 67 not recognized. (This port is not an HTTP proxy)
intentionally wrong curl
curl --proxy http://localhost:9050 google.com --output - -i
response
HTTP/1.0 501 not an HTTP Proxy
Content-Type: text/html; charset=iso-8859-1
<html>
<head>
<title>This is a SOCKS Proxy, Not An HTTP Proxy</title>
</head>
<body>
<h1>This is a SOCKs proxy, not an HTTP proxy.</h1>
</body>
</html>
looking at yt-dlp -v logs this line stands out
[debug] Proxy map: {'http': 'socks://localhost:9050', 'https': 'socks://localhost:9050'}
it took the URL header in without parsing it. (lol)
same line from yt-dlp -v with no proxy/geo-proxy set
[debug] Proxy map: {}
Verbose log
[debug] Command-line config: 'https://www.youtube.com/watch?v=EQOpCyvAhlY', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.03.08.1 [c0c2c57d3] (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.13.0-35-generic-x86_64-with-glibc2.29
[debug] exe versions: none
[debug] Optional libraries: secretstorage, sqlite
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.1
yt-dlp is up to date (2022.03.08.1)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=5510-jn_w1I
[youtube] 5510-jn_w1I: Downloading webpage
[youtube] 5510-jn_w1I: Downloading android player API JSON
ERROR: [youtube] 5510-jn_w1I: Video unavailable. This video is restricted. Please check the Google Workspace administrator and/or the network administrator restrictions.
File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 617, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 3339, in _real_extract
self.raise_no_formats(reason, expected=True)
File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 1126, in raise_no_formats
raise ExtractorError(msg, expected=expected, video_id=video_id)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to Fix "Downloading Proxy Script..." Error on Chrome
This message: " Downloading Proxy Script" will appear on Google Chrome Browser and it can take several minutes just to load a web...
Read more >Fix This Video is Not Available in Your Country Problem
This article will teach you how to resolve “this video is not available in your country” problem when you watch a YouTube video....
Read more >Fix Netflix Proxy Error (You seem to be using an Unblocker or ...
The best way to fix this Netflix “unblocker or proxy” error is by using a quality VPN. If you're already using a VPN,...
Read more >Can download helper working with Proxy? - Google Groups
I've tried couple of methods, but the latest download helper still doesn't work: 1. Using Proxy SwitchOmega addone. Video can play in browser...
Read more >How to Watch Blocked YouTube Videos – 4 Solutions
Can't Watch Some Videos on YouTube; Solution 1: Bypass YouTube Regional Filter; Solution 2: Use Proxy Server; Solution 3: Use VPN; Solution 4: ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The DNS/HTTP header restriction method gives the same error message too, from my testing.
In the case for users signed in to their organisation account it probably wouldn’t work. At the top of that page: “…you can help restrict which YouTube videos are viewable by signed-in users in your organization”.
DNS/HTTP header method is used for users that are signed out or logged in to an account not controlled by the organization imposing the restrictions, which is what we can bypass. At least from my understanding from the articles.
But, adding a workaround might not be worth it considering this would be a rare edge case.
The message “This video is restricted. Please check the Google Workspace administrator and/or the network administrator restrictions” is due to the video being restricted using Google workspace, not using DNS. So all domains are likely restricted