spacing and shebang

This commit is contained in:
Blacktwin 2018-08-23 06:31:17 -04:00
parent 59675d4a5b
commit 5ea6211956

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
'''
Pull poster images from Imgur and places them inside Shows root folder.
/path/to/show/Show.jpg
@ -28,6 +29,7 @@ class IMGURINFO(object):
self.link = d['link']
self.description = d['description']
def get_imgur():
url = "https://api.imgur.com/3/album/{ALBUM_ID}/images".format(ALBUM_ID=ALBUM_ID)
headers = {'authorization': 'Client-ID {}'.format(CLIENT_ID)}
@ -35,6 +37,7 @@ def get_imgur():
imgur_dump = r.json()
return[IMGURINFO(data=d) for d in imgur_dump['data']]
for x in get_imgur():
# Check if Show directory exists
if os.path.exists(os.path.join(SHOW_PATH, x.description)):