mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-11-10 04:52:29 +01:00
Fixed pyflakes and pep8 warnings
This commit is contained in:
parent
dd06c95e43
commit
7ed806d241
@ -11,6 +11,7 @@ from os.path import basename
|
||||
from .common import InfoExtractor
|
||||
from ..utils import ExtractorError, compat_urllib_request, compat_html_parser
|
||||
|
||||
|
||||
class GroovesharkHtmlParser(compat_html_parser.HTMLParser):
|
||||
def __init__(self):
|
||||
self._current_object = None
|
||||
@ -36,6 +37,7 @@ class GroovesharkHtmlParser(compat_html_parser.HTMLParser):
|
||||
p.close()
|
||||
return p.objects
|
||||
|
||||
|
||||
class GroovesharkIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(www\.)?grooveshark\.com/#!/s/([^/]+)/([^/]+)'
|
||||
_TEST = {
|
||||
@ -159,7 +161,7 @@ class GroovesharkIE(InfoExtractor):
|
||||
if 'swf_referer' in locals():
|
||||
headers['Referer'] = swf_referer
|
||||
|
||||
req = compat_urllib_request.Request(streamurl, post_data, headers)
|
||||
req = compat_urllib_request.Request(stream_url, post_data, headers)
|
||||
|
||||
info_dict = {
|
||||
'id': token,
|
||||
@ -170,6 +172,8 @@ class GroovesharkIE(InfoExtractor):
|
||||
'format': 'mp3 audio',
|
||||
'duration': duration,
|
||||
|
||||
# various ways of supporting the download request.
|
||||
# remove keys unnecessary to the eventual post implementation
|
||||
'post_data': post_data,
|
||||
'post_dict': post_dict,
|
||||
'headers': headers,
|
||||
@ -197,4 +201,3 @@ class GroovesharkIE(InfoExtractor):
|
||||
if fatal:
|
||||
raise ee
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user