Fixed bug in finelnames
authorMarek Marecki <marekjm@taistelu.com>
Sat, 10 Aug 2013 14:04:22 +0000 (16:04 +0200)
committerMarek Marecki <marekjm@taistelu.com>
Sat, 10 Aug 2013 14:04:22 +0000 (16:04 +0200)
sensual_asa_cat.py

index 27cf63d4dba5730260fb5bce61ed5162b2243c1c..338277986bf007e5577bd4e04f57ac676c309dfd 100644 (file)
@@ -49,7 +49,7 @@ for i, p in enumerate(oldstream):
         for n, photo in enumerate(p.data['photos']):
             print('{0}/{1}'.format(n+1, len(p.data['photos'])), end='\t')
             try:
-                name = photo['guid'] + photo['sizes']['large'].split('.')[-1]
+                name = '{0}.{1}'.format(photo['guid'] + photo['sizes']['large'].split('.')[-1])
                 urllib.request.urlretrieve(url=photo['sizes']['large'], filename=name)
                 print('[  OK  ]')
             except Exception as e: