Try to use human_curl library https://github.com/Lispython/human_curl
custom_headers = (
('Test-Header', 'fwkjenwkljbnfkjqnewfrjven3lrf'),
('Another-Header', 'ifenwqnfe;wnfqfjlweqnnlf')
)
r = human_curl.get("http://stackoverflow.com",
headers=custom_headers)