Imgur / imgurpython

Official Imgur python client library (deprecated)
MIT License
546 stars 116 forks source link

Submit Already Uploaded Image to Gallery? #68

Open bryanmcgrane opened 8 years ago

bryanmcgrane commented 8 years ago

I'm trying to automatically submit an image to the gallery after I upload it via URL, but I'm not sure exactly how. My upload code is:

from auth import authenticate

i = authenticate()

album = None 

title = 'Test Title'
description = 'Test Description: '
image_path = 'http://animal-dream.com/data_images/goose/goose2.jpg'

config = {
    'album': album,
    'name': title,
    'title': title,
    'description': description
}

print("Uploading image to Imgur... ")
image = i.upload_from_url(image_path, config=config, anon=False)
print("Imgur image posted at: {0}".format(image['link']))

I've found a link here, which explains how to do this with the json library, but I'm having issues merging the two. Using what I have above, can I somehow send a request to submit my image to the community?

s3cret commented 3 years ago

New to this repo here, not sure if it is correct but It seems once you post your album to the imgur community(public), it automatically becomes a gallery and the album becomes uneditable. Also, I do not find an icon or link on their website to add pictures to gallery.

BTW, I guess your returned status_code is 417, which might be related to the album(gallery) authorization issues.