Skip to content

Commit 3229030

Browse files
committed
[youtube] Fix lazy extractors (closes ytdl-org#28780)
1 parent dab83a2 commit 3229030

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

youtube_dl/extractor/youtube.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
12191219

12201220
@classmethod
12211221
def suitable(cls, url):
1222+
# Hack for lazy extractors until more generic solution is implemented
1223+
# (see #28780)
1224+
from .youtube import parse_qs
12221225
qs = parse_qs(url)
12231226
if qs.get('list', [None])[0]:
12241227
return False
@@ -2910,6 +2913,9 @@ class YoutubePlaylistIE(InfoExtractor):
29102913
def suitable(cls, url):
29112914
if YoutubeTabIE.suitable(url):
29122915
return False
2916+
# Hack for lazy extractors until more generic solution is implemented
2917+
# (see #28780)
2918+
from .youtube import parse_qs
29132919
qs = parse_qs(url)
29142920
if qs.get('v', [None])[0]:
29152921
return False

0 commit comments

Comments
 (0)