Last active
June 11, 2018 17:49
-
-
Save alxngyn/18856119041410e13489e7a5d2f8a2f2 to your computer and use it in GitHub Desktop.
This file contains 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
# importing the requests library | |
import requests | |
# defining the api-endpoint | |
API_ENDPOINT = "http://flappyblock.ml:3020/chats" | |
def lol_linus(message): | |
chatMessage = { | |
"name": "testbot", | |
"chat": message | |
} | |
# sending post request and saving response as response object | |
r = requests.post(url = API_ENDPOINT, data = chatMessage) | |
# extracting response text | |
response = r.text | |
print("The response is:%s"%response) | |
for i in range(10000): | |
mymessage = "Hi Linux #" + str(i) | |
lol_linus(mymessage) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment