You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nextdata = response.html.xpath("//script[@id='__NEXT_DATA__']")[0].text
nextdata = ''.join(nextdata.splitlines()) # removing newlines
nextdata = f"""{nextdata}"""
nextdata = json.loads(nextdata)
#print(json.dumps(nextdata, indent=2))
countries = [country['id'] for country in nextdata['props']['pageProps']['mainColumnData']['countriesOfOrigin']['countries']]
print(countries)
languages = [language['id'] for language in nextdata['props']['pageProps']['mainColumnData']['spokenLanguages']['spokenLanguages']]
print(languages)
Is it possible to make PyMovieDb return Country of origin and Language also?
The text was updated successfully, but these errors were encountered: