[networking] Add module (#2861)
No actual changes - code is only moved around
This commit is contained in:
parent
1b392f905d
commit
c365dba843
13 changed files with 587 additions and 500 deletions
9
yt_dlp/networking/exceptions.py
Normal file
9
yt_dlp/networking/exceptions.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import http.client
|
||||
import socket
|
||||
import ssl
|
||||
import urllib.error
|
||||
|
||||
network_exceptions = [urllib.error.URLError, http.client.HTTPException, socket.error]
|
||||
if hasattr(ssl, 'CertificateError'):
|
||||
network_exceptions.append(ssl.CertificateError)
|
||||
network_exceptions = tuple(network_exceptions)
|
||||
Loading…
Add table
Add a link
Reference in a new issue