1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

[golem] Fix under 2.6

It's a sad story; 2.6 does not support any non-trivial xpaths.
This commit is contained in:
Philipp Hagemeister 2014-09-29 05:48:56 +02:00
parent e50e2fcd4d
commit 8157ae3904

View File

@ -38,11 +38,9 @@ def _real_extract(self, url):
}
formats = []
for e in config.findall('./*[url]'):
for e in config:
url = e.findtext('./url')
if not url:
self._downloader.report_warning(
"{0}: url: empty, skipping".format(e.tag))
continue
formats.append({
@ -57,7 +55,7 @@ def _real_extract(self, url):
info['formats'] = formats
thumbnails = []
for e in config.findall('.//teaser[url]'):
for e in config.findall('.//teaser'):
url = e.findtext('./url')
if not url:
continue