Python change Accept-Language using requests -
i'm new python , trying infos imdb using requests library. code capturing data (e.g., movie titles) in native language, them in english. how can change accept-language in requests that?
all need define own headers:
import requests url = "http://www.imdb.com/title/tt0089218/" headers = {"accept-language": "en-us,en;q=0.5"} r = requests.get(url, headers=headers)
you can add whatever other headers you'd modify well.
Comments
Post a Comment