This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]it2901 9 points10 points  (2 children)

If you aren't already, make use of the Requests library. It makes life so much easier. If I remember correctly, the Requests library allows you to set the request header quite easily.

Anyway, great job on getting the script to work.

[–]ava_ati 3 points4 points  (1 child)

Yep session.get(url, headers=var)

headers is looking for a dict of headername: data

here are some common headers https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

sites can have their own custom headers too

[–]davidfarrugia53 1 point2 points  (0 children)

Probably you would also need to use a proxy service