League-of-Legends-Bot-Python/league_of_legends_requests.py

23 lines
522 B
Python
Raw Normal View History

2020-05-23 12:46:31 +00:00
import requests
import urllib3
urllib3.disable_warnings()
def league_of_legends_client_api():
try:
api_endpoint = "https://127.0.0.1:2999/liveclientdata/activeplayer"
response = requests.get(api_endpoint,verify=False)
if response.ok:
data = response.json()
return data
else:
print(f"Errore : {response.status_code}")
except:
print("Giocatore Non in Partita...")
data = None
return data
2020-05-23 12:46:31 +00:00
league_of_legends_client_api()