0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-30 03:33:02 +00:00

[youtube:user] check if the url didn't match only the other youtube extractors

This commit is contained in:
remitamine 2016-04-15 19:04:37 +01:00
parent b6612c9b11
commit f3a58d46bf

View file

@ -1987,8 +1987,8 @@ class YoutubeUserIE(YoutubeChannelIE):
def suitable(cls, url): def suitable(cls, url):
# Don't return True if the url can be extracted with other youtube # Don't return True if the url can be extracted with other youtube
# extractor, the regex would is too permissive and it would match. # extractor, the regex would is too permissive and it would match.
other_ies = iter(klass for (name, klass) in globals().items() if name.endswith('IE') and klass is not cls) other_yt_ies = iter(klass for (name, klass) in globals().items() if name.startswith('Youtube') and name.endswith('IE') and klass is not cls)
if any(ie.suitable(url) for ie in other_ies): if any(ie.suitable(url) for ie in other_yt_ies):
return False return False
else: else:
return super(YoutubeUserIE, cls).suitable(url) return super(YoutubeUserIE, cls).suitable(url)