made flake8 happy
This commit is contained in:
parent
2b60066afa
commit
971a137773
@ -11,16 +11,16 @@ from ..utils import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from Crypto.Cipher import AES, Blowfish
|
from Crypto.Cipher import AES
|
||||||
from binascii import b2a_hex
|
from binascii import b2a_hex
|
||||||
from ..compat import compat_ord, compat_chr
|
from ..compat import compat_ord, compat_chr
|
||||||
|
|
||||||
############
|
|
||||||
|
|
||||||
def md5hex(data):
|
def md5hex(data):
|
||||||
""" return hex string of md5 of the given string """
|
""" return hex string of md5 of the given string """
|
||||||
return md5(data).hexdigest().encode('utf-8')
|
return md5(data).hexdigest().encode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
def hexaescrypt(data, key):
|
def hexaescrypt(data, key):
|
||||||
""" returns hex string of aes encrypted data """
|
""" returns hex string of aes encrypted data """
|
||||||
c = AES.new(key, AES.MODE_ECB)
|
c = AES.new(key, AES.MODE_ECB)
|
||||||
@ -52,9 +52,6 @@ def getformat(song):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############
|
|
||||||
|
|
||||||
class DeezerPlaylistIE(InfoExtractor):
|
class DeezerPlaylistIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?deezer\.com/\w+/(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://(?:www\.)?deezer\.com/\w+/(?P<id>[0-9]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
@ -86,8 +83,6 @@ class DeezerPlaylistIE(InfoExtractor):
|
|||||||
|
|
||||||
host_stream_cdn = self._search_regex(
|
host_stream_cdn = self._search_regex(
|
||||||
r'var HOST_STREAM_CDN = \'(.*?)\'', webpage, 'host stream cdn')
|
r'var HOST_STREAM_CDN = \'(.*?)\'', webpage, 'host stream cdn')
|
||||||
setting_domain_img = self._search_regex(
|
|
||||||
r'var SETTING_DOMAIN_IMG = \'(.*?)\'', webpage, 'setting domain img')
|
|
||||||
|
|
||||||
data_json = self._search_regex(
|
data_json = self._search_regex(
|
||||||
(r'__DZR_APP_STATE__\s*=\s*({.+?})\s*</script>',
|
(r'__DZR_APP_STATE__\s*=\s*({.+?})\s*</script>',
|
||||||
@ -99,9 +94,6 @@ class DeezerPlaylistIE(InfoExtractor):
|
|||||||
playlist_uploader = data.get('DATA', {}).get('PARENT_USERNAME')
|
playlist_uploader = data.get('DATA', {}).get('PARENT_USERNAME')
|
||||||
# playlist_thumbnail = self._search_regex( r'<img id="naboo_playlist_image".*?src="([^"]+)"', webpage, 'playlist thumbnail')
|
# playlist_thumbnail = self._search_regex( r'<img id="naboo_playlist_image".*?src="([^"]+)"', webpage, 'playlist thumbnail')
|
||||||
|
|
||||||
preview_pattern = self._search_regex(
|
|
||||||
r"var SOUND_PREVIEW_GATEWAY\s*=\s*'([^']+)';", webpage,
|
|
||||||
'preview URL pattern', fatal=False)
|
|
||||||
entries = []
|
entries = []
|
||||||
|
|
||||||
if 'SONGS' in data:
|
if 'SONGS' in data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user