Skip to content

Instantly share code, notes, and snippets.

@svmihar
Created August 28, 2020 07:15
Show Gist options
  • Save svmihar/2602bfc1e6cc206d1fae821926e71508 to your computer and use it in GitHub Desktop.
Save svmihar/2602bfc1e6cc206d1fae821926e71508 to your computer and use it in GitHub Desktop.
import requests
import random
import time
r = ['yesterday', 'day1']
if __name__ == '__main__':
c=0
while True:
response = ''
try:
choice = random.choice(r)
print(choice)
response = requests.get(f'http://192.168.1.117:8581/{choice}')
except Exception as e:
print(e)
pass
finally:
print(response)
print(c)
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment