25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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
|