from imgurpython import ImgurClient client_id = 'your_client_id' client_secret = 'your_client_secret' access_token = 'your_access_token' refresh_token = 'your_refresh_token' client = ImgurClient(client_id, client_secret, access_token, refresh_token) image_path = 'path/to/image.jpg' image_title = 'My uploaded image' uploaded_image = client.upload_from_path(image_path, title=image_title) print(uploaded_image['link'])
from imgurpython import ImgurClient client_id = 'your_client_id' client_secret = 'your_client_secret' access_token = 'your_access_token' refresh_token = 'your_refresh_token' client = ImgurClient(client_id, client_secret, access_token, refresh_token) images = client.get_account_images('username') for image in images: print(image.link)This code connects to the Imgur API using the provided client_id, client_secret, access_token, and refresh_token. It then retrieves a list of images uploaded by the specified user and prints their URLs. Therefore, the package library is imgurpython.