Since reddit can be so random, let's make it try 3 times before saying no.
parent
7efbe19b2c
commit
feb70d09e8
|
@ -22,6 +22,12 @@ def randomreddit(phenny, input):
|
|||
|
||||
|
||||
url = "http://www.reddit.com/r/" + subreddit + "/.json"
|
||||
try:
|
||||
resp = web.get(url)
|
||||
except:
|
||||
try:
|
||||
resp = web.get(url)
|
||||
except:
|
||||
try:
|
||||
resp = web.get(url)
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue