X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fgrooveshark.py;h=36ad4915c5e7ea47feec8d32317ec15845a5b7d0;hb=d08225edf454dd28d0bc15d94b23d62c4deab7f4;hp=fff74a70a891fc163ff488408e4df348564b8a29;hpb=519c73f267325d833441340afb088cbd651c8459;p=youtube-dl diff --git a/youtube_dl/extractor/grooveshark.py b/youtube_dl/extractor/grooveshark.py index fff74a70a..36ad4915c 100644 --- a/youtube_dl/extractor/grooveshark.py +++ b/youtube_dl/extractor/grooveshark.py @@ -83,7 +83,7 @@ class GroovesharkIE(InfoExtractor): return compat_urlparse.urlunparse((uri.scheme, uri.netloc, obj['attrs']['data'], None, None, None)) def _transform_bootstrap(self, js): - return re.split('(?m)^\s*try\s*{', js)[0] \ + return re.split('(?m)^\s*try\s*\{', js)[0] \ .split(' = ', 1)[1].strip().rstrip(';') def _transform_meta(self, js): @@ -140,9 +140,9 @@ class GroovesharkIE(InfoExtractor): if webpage is not None: o = GroovesharkHtmlParser.extract_object_tags(webpage) - return (webpage, [x for x in o if x['attrs']['id'] == 'jsPlayerEmbed']) + return webpage, [x for x in o if x['attrs']['id'] == 'jsPlayerEmbed'] - return (webpage, None) + return webpage, None def _real_initialize(self): self.ts = int(time.time() * 1000) # timestamp in millis @@ -154,7 +154,7 @@ class GroovesharkIE(InfoExtractor): swf_referer = None if self.do_playerpage_request: (_, player_objs) = self._get_playerpage(url) - if player_objs is not None: + if player_objs: swf_referer = self._build_swf_referer(url, player_objs[0]) self.to_screen('SWF Referer: %s' % swf_referer)