1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-30 16:52:57 +01:00

[rutube:playlist] Fix suitable (closes #14166)

This commit is contained in:
Sergey M․ 2017-09-11 03:22:27 +07:00
parent 806498cf2f
commit f12a6e88b2
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -265,8 +265,10 @@ class RutubePlaylistIE(RutubePlaylistBaseIE):
_PAGE_TEMPLATE = 'http://rutube.ru/api/playlist/%s/%s/?page=%s&format=json' _PAGE_TEMPLATE = 'http://rutube.ru/api/playlist/%s/%s/?page=%s&format=json'
@staticmethod @classmethod
def suitable(url): def suitable(cls, url):
if not super(RutubePlaylistIE, cls).suitable(url):
return False
params = compat_parse_qs(compat_urllib_parse_urlparse(url).query) params = compat_parse_qs(compat_urllib_parse_urlparse(url).query)
return params.get('pl_type', [None])[0] and int_or_none(params.get('pl_id', [None])[0]) return params.get('pl_type', [None])[0] and int_or_none(params.get('pl_id', [None])[0])