Browse Source

Ajouter 'betaseries.py'

master
TheBidouilleur 8 months ago
parent
commit
7a80350e5e
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      betaseries.py

+ 20
- 0
betaseries.py View File

@@ -0,0 +1,20 @@
import logging
import requests
import json
from config import config

client_id = config['client_id']
login = config['login']
password = config['password']

def login_beta():
global betauser
print("Connexion a Betaseries en cours...")
API_auth = 'https://api.betaseries.com/members/auth'
API_auth += '?client_id=' + client_id +'&login=' + login + '&password=' + password
request = requests.post(API_auth)
if str(request) != '<Response [200]>' :
return False
data = request.json()
betauser = str(data['token'])
return betauser

Loading…
Cancel
Save