fixing img files with spaces

master
Castro0o 10 years ago
parent 37fbab880e
commit 017a323ffd

@ -55,7 +55,7 @@ def mw_page_imgsurl(site, page, thumb):
imgs = page.images() imgs = page.images()
imgs = list(imgs) imgs = list(imgs)
imgs_dict = { img.name:(img.imageinfo)['url'] for img in imgs if (img.imageinfo)['url'] != thumb } # exclude thumb imgs_dict = { img.name:(img.imageinfo)['url'] for img in imgs if (img.imageinfo)['url'] != thumb } # exclude thumb
imgs_dict = { key.capitalize():value for key, value in imgs_dict.items()} imgs_dict = { (key.capitalize()).replace(' ','_'):value for key, value in imgs_dict.items()}
# capilatize image name, so it can be called later # capilatize image name, so it can be called later
return imgs_dict return imgs_dict

Loading…
Cancel
Save