API-EZTV.it
API-EZTV.it copied to clipboard
Confused on API
Taken from the readme:
# get all the seasons from Game Of Thrones
seasons = test_api.seasons()
for season in seasons:
for episode in seasons[season]:
# will print the magnet link of all episodes, in all seasons
print seasons[season][episode]
What was the choice to go with above over something like:
season = tes_api.seasons()
for season in seasons:
for episode in season:
print episode
That is, directly iterating over the seasons/episodes instead of using indexes.