S
S
ssssergey2015-04-16 19:14:42
Python
ssssergey, 2015-04-16 19:14:42

How to use VPN in a Python program?

Wrote a program for downloading news from the site (requests + bs4). One site does not let me in, although I go through Zenmate VPN in Chrome. What should I do to make the site available to the program?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marazmiki, 2015-04-16
@marazmiki

If we are talking specifically about VPN, then python will connect to targets through it.
And the site that won't let you in probably looks at the User-Agent, sees something like "python-requests" there, and treats it the way bots are supposed to. Try to change the UserAgent for the purity of the experiment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question