This commit is contained in:
@@ -113,11 +113,21 @@ class betaserieUtils():
|
||||
url = "https://api.betaseries.com/shows/display?id="+str(show_id)
|
||||
response = requests.request("GET", url, headers=self.headers, data=self.payload)
|
||||
|
||||
maximum_number_seasons = response.json()['show']['seasons']
|
||||
if verbose : print("maximum_number_seasons: "+str(maximum_number_seasons))
|
||||
|
||||
seasons_details = response.json()['show']['seasons_details']
|
||||
|
||||
#checking if the first season is season 0, and if so remove this season
|
||||
if (seasons_details[0]['number']==0):
|
||||
season_0_to_remove = seasons_details[0]
|
||||
|
||||
if verbose : print(season_0_to_remove)
|
||||
|
||||
seasons_details.remove(season_0_to_remove)
|
||||
|
||||
maximum_number_seasons = len(seasons_details)
|
||||
|
||||
if verbose : print("maximum_number_seasons: "+str(maximum_number_seasons))
|
||||
|
||||
|
||||
if verbose:
|
||||
print("Url request: "+str(url))
|
||||
print(response.text)
|
||||
|
||||
Reference in New Issue
Block a user