@@ -65,7 +65,9 @@ based on a given title.
6565``` python
6666from simplejustwatchapi import search
6767
68- results = search(" The Matrix" , " US" , " en" , 5 , True , 0 , {" nfx" , " apv" })
68+ results = search(" The Matrix" , " US" , " en" , 5 , True , 0 , [" nfx" , " apv" ])
69+ for entry in results:
70+ print (entry.title, entry.offers)
6971```
7072
7173All arguments are optional.
@@ -95,7 +97,9 @@ currently popular titles.
9597``` python
9698from simplejustwatchapi import popular
9799
98- results = popular(" US" , " en" , 5 , True , 0 , {" nfx" , " apv" })
100+ results = popular(" US" , " en" , 5 , True , 0 , [" nfx" , " apv" ])
101+ for entry in results:
102+ print (entry.title, entry.offers)
99103```
100104
101105All arguments are optional.
@@ -122,7 +126,8 @@ for a single entry via its node ID.
122126``` python
123127from simplejustwatchapi import details
124128
125- results = details(" tm19698" , " US" , " en" , False )
129+ result = details(" tm19698" , " US" , " en" , False )
130+ print (result.title, result.short_description)
126131```
127132
128133Node ID can be taken from output of the [ ` search ` ] ( #search-for-a-title ) function.
@@ -160,6 +165,8 @@ for all seasons of a TV show based on its node ID.
160165from simplejustwatchapi import seasons
161166
162167results = seasons(" tss20091" , " US" , " en" , True )
168+ for season in results:
169+ print (season.season_number, season.total_episode_count)
163170```
164171
165172Only the first argument is required - the node ID of a TV show to look up season
@@ -175,9 +182,11 @@ Example function call and its output is in
175182details for all episodes of a single TV show season based on its node ID.
176183
177184``` python
178- from simplejustwatchapi import seasons
185+ from simplejustwatchapi import episodes
179186
180187results = episodes(" tse334769" , " US" , " en" , False )
188+ for episode in results:
189+ print (episode.episode_id, episode.episode_number, episode.offers)
181190```
182191
183192Only the first argument is required - the node ID of a season to look up episode details
@@ -202,6 +211,10 @@ Only offers are returned, not additional data.
202211from simplejustwatchapi import offers_for_countries
203212
204213results = offers_for_countries(" tm10" , {" US" , " UK" , " CA" }, " en" , True )
214+ for country, offers in results.items():
215+ print (f " Offers for { country} : " )
216+ for offer in offers:
217+ print (f " - { offer.package.name} : { offer.monetization_type} " )
205218```
206219
207220First two arguments are required - ID, and a set of country codes.
@@ -220,6 +233,11 @@ given country.
220233from simplejustwatchapi import providers
221234
222235results = providers(" US" )
236+ netflix_apple_only = [
237+ provider
238+ for provider in all_providers
239+ if provider.name in (" Netflix" , " Apple TV" )
240+ ]
223241```
224242
225243Returned value is a list of [ ` OfferPackage ` ] [ simplejustwatchapi.tuples.OfferPackage ] .
0 commit comments