aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorGeorge Brighton <george@gebn.co.uk>2015-06-27 05:22:35 +0100
committerGeorge Brighton <george@gebn.co.uk>2015-06-27 20:16:53 +0100
commit71f9e49e67bfe62c9f1a6d8f74b7d81ab820ba84 (patch)
treec0fe5def44a62732244a7c7a98bd1a902dacb4a3 /youtube_dl
parent82ea1051b54134150f290d3d9f259a4baf54faf4 (diff)
[moviefap] Fix dictionary comprehension syntax incompatible with Python 2.6
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/moviefap.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/youtube_dl/extractor/moviefap.py b/youtube_dl/extractor/moviefap.py
index 49b8ab7d9..88f9dab6f 100644
--- a/youtube_dl/extractor/moviefap.py
+++ b/youtube_dl/extractor/moviefap.py
@@ -48,17 +48,19 @@ class MovieFapIE(InfoExtractor):
return []
# get the required information from the XML
- attrs = {attr: str_to_int(timeline.find(attr).text)
- for attr in ['imageWidth', 'imageHeight', 'imageFirst', 'imageLast']}
+ width = str_to_int(timeline.find('imageWidth').text)
+ height = str_to_int(timeline.find('imageHeight').text)
+ first = str_to_int(timeline.find('imageFirst').text)
+ last = str_to_int(timeline.find('imageLast').text)
pattern = timeline.find('imagePattern').text
# generate the list of thumbnail information dicts
thumbnails = []
- for i in range(attrs['imageFirst'], attrs['imageLast'] + 1):
+ for i in range(first, last + 1):
thumbnails.append({
'url': pattern.replace('#', str(i)),
- 'width': attrs['imageWidth'],
- 'height': attrs['imageHeight']
+ 'width': width,
+ 'height': height
})
return thumbnails