mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 22:52:52 +08:00
[golem] Don't omit positional argument specifiers
Required by Python 2.6.
This commit is contained in:
parent
6a5af6acb9
commit
70752ccefd
@ -22,7 +22,7 @@ class GolemIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_CONFIG = 'https://video.golem.de/xml/{}.xml'
|
_CONFIG = 'https://video.golem.de/xml/{0}.xml'
|
||||||
_PREFIX = 'http://video.golem.de'
|
_PREFIX = 'http://video.golem.de'
|
||||||
|
|
||||||
def _warn(self, fmt, *args):
|
def _warn(self, fmt, *args):
|
||||||
@ -33,7 +33,7 @@ class GolemIE(InfoExtractor):
|
|||||||
|
|
||||||
url = elem.findtext('./url')
|
url = elem.findtext('./url')
|
||||||
if url == '':
|
if url == '':
|
||||||
self._warn("{}: url: empty, skipping", format_id)
|
self._warn("{0}: url: empty, skipping", format_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
fmt = {
|
fmt = {
|
||||||
@ -44,7 +44,7 @@ class GolemIE(InfoExtractor):
|
|||||||
try:
|
try:
|
||||||
_, ext = elem.findtext('./filename', '').rsplit('.', 1)
|
_, ext = elem.findtext('./filename', '').rsplit('.', 1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self._warn('{}: ext: missing extension', format_id)
|
self._warn('{0}: ext: missing extension', format_id)
|
||||||
else:
|
else:
|
||||||
fmt['ext'] = ext
|
fmt['ext'] = ext
|
||||||
|
|
||||||
@ -53,21 +53,21 @@ class GolemIE(InfoExtractor):
|
|||||||
try:
|
try:
|
||||||
fmt['filesize'] = int(filesize)
|
fmt['filesize'] = int(filesize)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('{}: filesize: {}', format_id, e)
|
self._warn('{0}: filesize: {1}', format_id, e)
|
||||||
|
|
||||||
width = elem.get('width')
|
width = elem.get('width')
|
||||||
if width is not None:
|
if width is not None:
|
||||||
try:
|
try:
|
||||||
fmt['width'] = int(width)
|
fmt['width'] = int(width)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('{}: width: {}', format_id, e)
|
self._warn('{0}: width: {1}', format_id, e)
|
||||||
|
|
||||||
height = elem.get('height')
|
height = elem.get('height')
|
||||||
if height is not None:
|
if height is not None:
|
||||||
try:
|
try:
|
||||||
fmt['height'] = int(height)
|
fmt['height'] = int(height)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('{}: height: {}', format_id, e)
|
self._warn('{0}: height: {1}', format_id, e)
|
||||||
|
|
||||||
return fmt
|
return fmt
|
||||||
|
|
||||||
@ -84,14 +84,14 @@ class GolemIE(InfoExtractor):
|
|||||||
try:
|
try:
|
||||||
thumb['width'] = int(width)
|
thumb['width'] = int(width)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('thumbnail: width: {}', e)
|
self._warn('thumbnail: width: {0}', e)
|
||||||
|
|
||||||
height = elem.get('height')
|
height = elem.get('height')
|
||||||
if height is not None:
|
if height is not None:
|
||||||
try:
|
try:
|
||||||
thumb['height'] = int(height)
|
thumb['height'] = int(height)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('thumbnail: height: {}', e)
|
self._warn('thumbnail: height: {0}', e)
|
||||||
|
|
||||||
return thumb
|
return thumb
|
||||||
|
|
||||||
@ -126,6 +126,6 @@ class GolemIE(InfoExtractor):
|
|||||||
try:
|
try:
|
||||||
info['duration'] = round(float(playtime))
|
info['duration'] = round(float(playtime))
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self._warn('duration: {}', e)
|
self._warn('duration: {0}', e)
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
Loading…
Reference in New Issue
Block a user