Skip to content

Commit

Permalink
[youtube:user] check if the url didn't match only the other youtube e…
Browse files Browse the repository at this point in the history
…xtractors
  • Loading branch information
remitamine committed Apr 15, 2016
1 parent b6612c9 commit f3a58d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,8 +1987,8 @@ class YoutubeUserIE(YoutubeChannelIE):
def suitable(cls, url):
# Don't return True if the url can be extracted with other youtube
# 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)
if any(ie.suitable(url) for ie in other_ies):
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_yt_ies):
return False
else:
return super(YoutubeUserIE, cls).suitable(url)
Expand Down

0 comments on commit f3a58d4

Please sign in to comment.