]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[comedycentral] Change XPath .//guid to ./guid (fixes #2668)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 1 Apr 2014 19:38:07 +0000 (21:38 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 1 Apr 2014 19:38:07 +0000 (21:38 +0200)
It fails to find the element in python 2.6 and it's not required, the
element is a direct child of the item node.

youtube_dl/extractor/comedycentral.py

index 970df86ef0f79d9ec449526bd3cef753eefcce3f..40870cb861b88d70db5c8ac6f7fa57c5861c53c5 100644 (file)
@@ -165,7 +165,7 @@ class ComedyCentralShowsIE(InfoExtractor):
             content = itemEl.find('.//{http://search.yahoo.com/mrss/}content')
             duration = float_or_none(content.attrib.get('duration'))
             mediagen_url = content.attrib['url']
-            guid = itemEl.find('.//guid').text.rpartition(':')[-1]
+            guid = itemEl.find('./guid').text.rpartition(':')[-1]
 
             cdoc = self._download_xml(
                 mediagen_url, epTitle,