RedditImageGrab
RedditImageGrab copied to clipboard
Fix the update flag (now including test)
fix #52 by adding the specific exception handler in the inner exception handling block.
Now the update flag works as supposed:
matthias@seth:~/git/RedditImageGrab$ python redditdl.py cats ~/Bilder/cats --num 5 --update
Downloading images from "cats" subreddit
Attempting to download URL[http://www.explodingkittens.com/kittyconvict?2] as [3v84lg].
WRONG FILE TYPE: http://www.explodingkittens.com/kittyconvict?2 has type: text/html!
Attempting to download URL[http://imgur.com/98fqWq0.jpg] as [51usgy.jpg].
URL [http://imgur.com/98fqWq0.jpg] already downloaded.
Update complete, exiting.
Downloaded 0 files
Thanks to @rachmadaniHaryono for adding tests for the fix continue flag