work on the random part
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s

This commit is contained in:
2026-08-26 19:29:15 +01:00
parent 1d86eb582e
commit e157a8c077
2 changed files with 27 additions and 4 deletions
+11 -3
View File
@@ -1,6 +1,6 @@
import requests
from django.conf import settings
from apps.betaserie.utils import betaserieUtils
def full_testing(url_website):
status = "unknown"
@@ -38,8 +38,16 @@ def test_website(url_website,bool_proxy=False):
return status
def randomEpisode(seasonInformation):
return 0,0
def randomEpisode(seasonInformation,maximum_number_of_seasons):
random_season = random.randint(1, maximum_number_of_seasons)
print("random season: " + str(random_season))
maximum_number_of_episodes = seasonInformation[random_season-1]['episodes']
random_episode = random.randint(1, maximum_number_of_episodes)
print("random episode: " + str(random_episode))
return random_season,random_episode
def followingEpisode(season,episode,seasonInformation,maximum_number_seasons):
lastEpisode = False