mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-23 00:07:49 +00:00
[utils] Add rationale for register_socks_protocols
This commit is contained in:
parent
51fb4995a5
commit
d5ae6bb501
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ from .socks import (
|
||||||
|
|
||||||
def register_socks_protocols():
|
def register_socks_protocols():
|
||||||
# "Register" SOCKS protocols
|
# "Register" SOCKS protocols
|
||||||
|
# In Python < 2.6.5, urlsplit() suffers from bug https://bugs.python.org/issue7904
|
||||||
|
# URLs with protocols not in urlparse.uses_netloc are not handled correctly
|
||||||
for scheme in ('socks', 'socks4', 'socks4a', 'socks5'):
|
for scheme in ('socks', 'socks4', 'socks4a', 'socks5'):
|
||||||
if scheme not in compat_urlparse.uses_netloc:
|
if scheme not in compat_urlparse.uses_netloc:
|
||||||
compat_urlparse.uses_netloc.append(scheme)
|
compat_urlparse.uses_netloc.append(scheme)
|
||||||
|
|
Loading…
Reference in a new issue