Преглед на файлове

Mise à jour de 'betaseries.py'

master
TheBidouilleur преди 8 месеца
родител
ревизия
2bc4e60de5
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. +12
    -0
      betaseries.py

+ 12
- 0
betaseries.py Целия файл

@@ -3,6 +3,11 @@ import requests
import json
from config import config

#Love Is War / Une serie pour tester le programme.
thetvdb_id= '354198'


token = config['token']
client_id = config['client_id']
login = config['login']
password = config['password']
@@ -18,3 +23,10 @@ def login_beta():
data = request.json()
betauser = str(data['token'])
return betauser
def create_api(choice):
if choice == 'latest' :
base_url = 'https://api.betaseries.com/episodes/latest?'
API = base_url + 'token=' + token + '&client_id=' + client_id + '&thetvdb_id=' + thetvdb_id
return API

Loading…
Отказ
Запис