mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
flake8 corrections
This commit is contained in:
parent
cce0068ef3
commit
4d3c82222c
1 changed files with 10 additions and 9 deletions
|
@ -10,8 +10,8 @@
|
||||||
orderedSet,
|
orderedSet,
|
||||||
)
|
)
|
||||||
|
|
||||||
class DeezerBaseInfoExtractor(InfoExtractor):
|
|
||||||
|
|
||||||
|
class DeezerBaseInfoExtractor(InfoExtractor):
|
||||||
def get_data(self, url):
|
def get_data(self, url):
|
||||||
if not self._downloader.params.get('test'):
|
if not self._downloader.params.get('test'):
|
||||||
self._downloader.report_warning('For now, this extractor only supports the 30 second previews. Patches welcome!')
|
self._downloader.report_warning('For now, this extractor only supports the 30 second previews. Patches welcome!')
|
||||||
|
@ -34,6 +34,7 @@ def get_data(self, url):
|
||||||
data = json.loads(data_json)
|
data = json.loads(data_json)
|
||||||
return id, webpage, data
|
return id, webpage, data
|
||||||
|
|
||||||
|
|
||||||
class DeezerPlaylistIE(DeezerBaseInfoExtractor):
|
class DeezerPlaylistIE(DeezerBaseInfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?deezer\.com/(../)?playlist/(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://(?:www\.)?deezer\.com/(../)?playlist/(?P<id>[0-9]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
|
@ -86,6 +87,7 @@ def _real_extract(self, url):
|
||||||
'entries': entries,
|
'entries': entries,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class DeezerAlbumIE(DeezerBaseInfoExtractor):
|
class DeezerAlbumIE(DeezerBaseInfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?deezer\.com/(../)?album/(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://(?:www\.)?deezer\.com/(../)?album/(?P<id>[0-9]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
|
@ -127,13 +129,12 @@ def _real_extract(self, url):
|
||||||
'uploader_id': s.get('ART_ID'),
|
'uploader_id': s.get('ART_ID'),
|
||||||
'age_limit': 16 if s.get('EXPLICIT_LYRICS') == '1' else 0,
|
'age_limit': 16 if s.get('EXPLICIT_LYRICS') == '1' else 0,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'track' : s.get('SNG_TITLE'),
|
'track': s.get('SNG_TITLE'),
|
||||||
'track_number' : int(s.get('TRACK_NUMBER')),
|
'track_number': int(s.get('TRACK_NUMBER')),
|
||||||
'track_id' : s.get('SNG_ID'),
|
'track_id': s.get('SNG_ID'),
|
||||||
'artist' : album_uploader,
|
'artist': album_uploader,
|
||||||
'album' : album_title,
|
'album': album_title,
|
||||||
'album_artist' : album_uploader,
|
'album_artist': album_uploader,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue