Git Product home page Git Product logo

imgur-to-folder's Introduction

Imgur-To-Folder

Download Imgur albums and images to desired folder

Gif of an example


Updates:

Updated with ability to download without the use of -a or -i. It should automatically detect.

Updated with ability to download all favorited within your account.

There is now .gifv imgur link support.

How to install:

Repository developed using Python 3

Copy repository from github:

git clone https://github.com/santosderek/Imgur-To-Folder
cd Imgur-To-Folder

Create an Imgur account at http://imgur.com/

Next go to https://api.imgur.com/oauth2/addclient and create a new application using a name of your choice, and the authorization type of:

  • OAuth 2 Authorization without a callback URL

Complete the rest of the form.

Within * ImgurToFolder/config.json add in your CLIENT_ID and CLIENT_SECRET found on your http://imgur.com/account/settings/apps page.

Next within the command-line type: (and within the Imgur-To-Folder folder)

python3 setup.py install

Congrats! It's installed. Now you can proceed bellow


How to use:

Base command:

imgurToFolder

Following commands can be used:

Help page

imgurToFolder --help

Automatic Url Detection

Automatically downloads Imgur links without user specifically declaring the imgur type.

imgurtofolder [urls]

Change folder path to download

imgurToFolder --folder FOLDER_PATH_HERE | OR | imgurToFolder --f  FOLDER_PATH_HERE

Specifically download album/gallery using album url

imgurToFolder --album  ALBUM_URL_HERE | OR | imgurToFolder --a  ALBUM_URL_HERE

Specifically download single image using image url

--image and -i command are used for i.imgur.com links

imgurToFolder --image  IMAGE_URL_HERE | OR | imgurToFolder --i  IMAGE_URL_HERE

Download all account images within your profile

Please see below for authenticating setup.

imgurToFolder --download-account-images | OR | imgurToFolder -dai

List all favorited Imgur links within your profile

Please see below for authenticating setup.

imgurToFolder --list-all-favorites [username] | OR | imgurToFolder -lf [username]

Download favorited Imgur links within your profile

Please see below for authenticating setup.

Download all favorites in order of latest.

imgurToFolder --download-latest-favorites [username] | OR | imgurToFolder -df [username]

Download all favorites in order of oldest.

imgurToFolder --download-oldest-favorites [username] | OR | imgurToFolder -df [username]

To limit number of favorites to download use --max-favorites:

imgurToFolder --download-latest-favorites [username] --max_favorites [maximum_number_of_favorites]

[OR]

imgurToFolder --download-oldest-favorites [username] --max_favorites [maximum_number_of_favorites]

Example for latest 60 favorites

imgurToFolder --download-latest-favorites [username] --max_favorites 60

Over-write existing files (disables skipping)

To over-write existing files use --overwrite

imgurToFolder [URLS] --overwrite

Enable debugging output

*To enable debugging output use --verbose

imgurtofolder [URLS] --verbose

Authentication Setup For Account Access (Only needed to download favorites)

To access your favorites, you must first permit this application to access your account.

In order to do so, run either the imgurToFolder --list-all-favorites [username] command or the imgurToFolder --download-latest-favorites [username] command with your username replacing [username].

A message will appear asking the user to visit a specified url and log in. This page takes you to Imgur to authenticate Imgur-To-Folder, and allow the program to view your favorites.

After logging in, you will be redirected back to the Imgur home page, though, your url address bar will contain new arguments. The url will now look like the url below:

https://imgur.com/?state=authorizing#access_token={access_token_here}&expires_in={integer_here}&token_type=bearer&refresh_token={refresh_token_here}&account_username={your_username_here}&account_id={your_id_here}

Paste in the redirected url located in the address bar, back into the terminal / cmd window to complete the authentication process.

You should now be able to list and download your Imgur favorites.

This step will no longer be needed for later favorites downloads.

Imgur Rate Limiting.

"The Imgur API uses a credit allocation system to ensure fair distribution of capacity. Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day. If the daily limit is hit five times in a month, then the app will be blocked for the rest of the month."

- Imgur Offical Documentation

Warning

imgur.com/r/*** links are not supported yet! - This will just download the HTML code off the Imgur page.

Clarification

Imgur-To-Folder does NOT store any username or password data. This is what the client_id and client_secret are for.

Though, Imgur themselves will ask you to verify that you want to allow my program to use your account info.

ALL sensitive data does NOT go to me in anyway, shape, or form.

imgur-to-folder's People

Contributors

santosderek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.