[livestream] Fix FutureWarning (Closes #8742)
authorSergey M․ <dstftw@gmail.com>
Thu, 3 Mar 2016 19:16:58 +0000 (01:16 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 3 Mar 2016 19:16:58 +0000 (01:16 +0600)
youtube_dl/extractor/livestream.py

index 38fb3d9e4166f5f4a188ab2436c27240a8b04283..9884362261aa4deab85f8e25718feaaa7a07afce 100644 (file)
@@ -64,7 +64,7 @@ class LivestreamIE(InfoExtractor):
     def _parse_smil_formats(self, smil, smil_url, video_id, namespace=None, f4m_params=None, transform_rtmp_url=None):
         base_ele = find_xpath_attr(
             smil, self._xpath_ns('.//meta', namespace), 'name', 'httpBase')
-        base = base_ele.get('content') if base_ele else 'http://livestreamvod-f.akamaihd.net/'
+        base = base_ele.get('content') if base_ele is not None else 'http://livestreamvod-f.akamaihd.net/'
 
         formats = []
         video_nodes = smil.findall(self._xpath_ns('.//video', namespace))