Created
August 28, 2020 07:15
-
-
Save svmihar/2602bfc1e6cc206d1fae821926e71508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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