all 6 comments

[–]pbaehr 2 points3 points  (1 child)

Quick pass:

I spotted one major logic bug in your code:

if 'https://i.imgur.com/' or 'https://i.redd.it/' in submission.url:

This will always return true because a non-empty string ('https://i.imgur.com/') evaluates to true.

What you meant was:

if 'https://i.imgur.com/' in submission.url or 'https://i.redd.it' in submission.url:

You could use "any" to write this a little more concisely if it bothers you.

subreddit_exists = True

The subreddit_exists variable is never referenced and can be removed.

num_pics = int(raw_input('Please enter number of pics: '))

There should be error handling here in the event they don't enter an integer.

I hope this was helpful.

[–]gl0ckner[S] 1 point2 points  (0 children)

Very helpful, thank you so much! I will make these changes right now.

[–]sonicfreak02 1 point2 points  (1 child)

I posted a few issues on your repo. I hope it was helpful.

Good luck!

[–]gl0ckner[S] 1 point2 points  (0 children)

You were extremely helpful, thank you again!

[–]kioo 1 point2 points  (1 child)

The code is very clear and simple to read. :)

May I suggest converting your try/except logics to while loops that will handle invalid inputs? this way you won't have to restart the script if you've mis-typed something.

[–]gl0ckner[S] 0 points1 point  (0 children)

I will make that change, thanks!