[grooveshark] Fix extraction
authorSergey M․ <dstftw@gmail.com>
Tue, 17 Mar 2015 17:13:43 +0000 (23:13 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 17 Mar 2015 17:13:43 +0000 (23:13 +0600)
youtube_dl/extractor/grooveshark.py

index 848d17beb4d3559cb818f14795655b12912e0f11..36ad4915c5e7ea47feec8d32317ec15845a5b7d0 100644 (file)
@@ -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)