-# coding: utf-8
-from __future__ import unicode_literals
-
import hashlib
import itertools
-import re
from .common import InfoExtractor
from ..compat import compat_str
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld, album_id, track_id = mobj.group('tld'), mobj.group('album_id'), mobj.group('id')
track = self._call_api(
download_data = self._download_json(
'https://music.yandex.ru/api/v2.1/handlers/track/%s:%s/web-album_track-track-track-main/download/m' % (track_id, album_id),
- track_id, 'Downloading track location url JSON',
- headers={'X-Retpath-Y': url})
+ track_id, 'Downloading track location url JSON', query={'hq': 1}, headers={'X-Retpath-Y': url})
fd_data = self._download_json(
download_data['src'], track_id,
return False if YandexMusicTrackIE.suitable(url) else super(YandexMusicAlbumIE, cls).suitable(url)
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld = mobj.group('tld')
album_id = mobj.group('id')
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld = mobj.group('tld')
user = mobj.group('user')
playlist_id = mobj.group('id')
})
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld = mobj.group('tld')
artist_id = mobj.group('id')
data = self._call_artist(tld, url, artist_id)
_ARTIST_WHAT = 'tracks'
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld = mobj.group('tld')
artist_id = mobj.group('id')
data = self._call_artist(tld, url, artist_id)
_ARTIST_WHAT = 'albums'
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
tld = mobj.group('tld')
artist_id = mobj.group('id')
data = self._call_artist(tld, url, artist_id)