mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
[ie, cleanup] No from stdlib imports in extractors (#8978)
This commit is contained in:
parent
a25a424323
commit
e3a3ed8a98
20 changed files with 56 additions and 61 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import json
|
||||
from socket import timeout
|
||||
import socket
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
|
|
@ -56,7 +56,7 @@ class DTubeIE(InfoExtractor):
|
|||
try:
|
||||
self.to_screen('%s: Checking %s video format URL' % (video_id, format_id))
|
||||
self._downloader._opener.open(video_url, timeout=5).close()
|
||||
except timeout:
|
||||
except socket.timeout:
|
||||
self.to_screen(
|
||||
'%s: %s URL is invalid, skipping' % (video_id, format_id))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue