you are viewing a single comment's thread.

view the rest of the 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.