From 3c87b05bb06fd1ffe0c200d85d83555b66da5a69 Mon Sep 17 00:00:00 2001 From: Paper <37962225+mrpapersonic@users.noreply.github.com> Date: Sat, 7 May 2022 17:00:52 -0400 Subject: [PATCH] Python 2 --- youtube_dl/extractor/vidlii.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/vidlii.py b/youtube_dl/extractor/vidlii.py index 0d3b0961e..4b09270df 100644 --- a/youtube_dl/extractor/vidlii.py +++ b/youtube_dl/extractor/vidlii.py @@ -14,9 +14,10 @@ from ..utils import ( urljoin, ) -from ..compat import ( - compat_HTTPError -) +try: + from urllib.error import HTTPError +except ImportError: # Python 2 support + from urllib2 import HTTPError class VidLiiIE(InfoExtractor): @@ -89,7 +90,7 @@ class VidLiiIE(InfoExtractor): try: self._request_webpage(sources[1][1], video_id, 'Checking HD URL') add_format(sources[1][1]) - except compat_HTTPError: + except HTTPError: pass add_format(sources[0][1])