made flake8 happy

This commit is contained in:
deezerdl 2017-05-24 16:07:26 +00:00 committed by GitHub
parent 2b60066afa
commit 971a137773

View File

@ -11,16 +11,16 @@ from ..utils import (
)
from hashlib import md5
from Crypto.Cipher import AES, Blowfish
from Crypto.Cipher import AES
from binascii import b2a_hex
from ..compat import compat_ord, compat_chr
############
def md5hex(data):
""" return hex string of md5 of the given string """
return md5(data).hexdigest().encode('utf-8')
def hexaescrypt(data, key):
""" returns hex string of aes encrypted data """
c = AES.new(key, AES.MODE_ECB)
@ -52,9 +52,6 @@ def getformat(song):
return 1
############
class DeezerPlaylistIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?deezer\.com/\w+/(?P<id>[0-9]+)'
_TEST = {
@ -86,8 +83,6 @@ class DeezerPlaylistIE(InfoExtractor):
host_stream_cdn = self._search_regex(
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(
(r'__DZR_APP_STATE__\s*=\s*({.+?})\s*</script>',
@ -99,9 +94,6 @@ class DeezerPlaylistIE(InfoExtractor):
playlist_uploader = data.get('DATA', {}).get('PARENT_USERNAME')
# 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 = []
if 'SONGS' in data: