patrickloeber / python-fun

Some fun and useful projects with Python
MIT License
725 stars 561 forks source link

Changing request header to get English movie titles #6

Closed weidenhaus closed 3 years ago

weidenhaus commented 3 years ago

By changing the accept-language header for the initial request we can make sure to always get the English title for movies, not the translation for the current location of the user

Before (user based in Germany): 'Die Verurteilten', 'Der Pate', 'Der Pate 2', 'The Dark Knight', 'Die zwölf Geschworenen'

After: 'The Shawshank Redemption', 'The Godfather', 'The Godfather: Part II', 'The Dark Knight', '12 Angry Men'