A Python script which gives out an array of the images url of an imgur link.
Album links and single image links are working!
Donwload or clone this repository:
$ git clone https://github.com/KurzGedanke/Imgur-URL.git
Change the directory to the Imgur-URL
dir and install the requirements.
$ cd Imgur-URL
$ pip install -r requirements.txt
Run the file with the -h
flag for help:
$ python imgur_url.py -h
usage: imgur_url.py [-h] [-list ImgurLink] [-download ImgurLink]
List or Download Imgur Links
optional arguments:
-h, --help show this help message and exit
-list ImgurLink List all links from the Album.
-download ImgurLink Downloads all images from the album.
With the -list
flag it prints out the whole list of urls and with the -download
flag its downloading all images into
a folder of your choice. For example:
$ python imgur_url.py -download https://imgur.com/a/3aeC1
Please enter your desired path:
$ /Users/lucius/Desktop/newFolder
Your Download starts:
/Users/lucius/Desktop/newFolder/ITKdVe8.png
/Users/lucius/Desktop/newFolder/TBkr4BC.png
/Users/lucius/Desktop/newFolder/vZjTwWQ.png
/Users/lucius/Desktop/newFolder/2c1NIP2.png
/Users/lucius/Desktop/newFolder/ITKdVe8.png
/Users/lucius/Desktop/newFolder/TBkr4BC.png
/Users/lucius/Desktop/newFolder/vZjTwWQ.png
/Users/lucius/Desktop/newFolder/2c1NIP2.png
Download finished!
You have to enter a full path but a new folder is created for you.
Enter:
$ git clone https://github.com/KurzGedanke/Imgur-URL.git
in your Terminal and copy the requirements.txt
and imgur_url.py
to your project directory.
With your virtualenv enabled or not, run following command in your terminal:
$ pip install -r requirements.txt
Now import the script in your python file.
import imgur_url
Then assign the ImgurURL()
class to your desired variable and call the get_imgur_urls
function.
url = imgur_url.ImgurURL()
print(url.get_imgur_urls('imgur.com/a/$HASH'))
.get_imgur_urls()
returns always an array!
- single image links
- album links
- downloading files as Command Line Tool
- path normalisation for downloading
- gallery links
- pip install
- tests
- CI