1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[ie, cleanup] No from stdlib imports in extractors (#8978)

This commit is contained in:
pukkandan
2024-04-01 05:31:09 +05:30
committed by GitHub
parent a25a424323
commit e3a3ed8a98
20 changed files with 56 additions and 61 deletions

View File

@ -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