V
V
Vyacheslav Grachunov2016-05-14 16:38:13
Python
Vyacheslav Grachunov, 2016-05-14 16:38:13

How can a Python 3 script pretend to be a browser as much as possible?

Actually a subject. Parsing. What do sites check besides ip? They don’t ban by ip, because after dumping the script from the browser, I go quietly. How to make me not be fired and considered a browser? Slippers are standing. user agent from firefox windows

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
DarkMatter, 2016-05-14
@darkmatter

He won’t learn much as much as possible because he still won’t be able to move the mouse. Then you need phantom.js

V
Vladimir Kuts, 2016-05-14
@fox_12

See what headers the browser sends (User-Agent and others), and substitute the same ones.
Use cookies.
In especially difficult cases, use Selenium webdriver.

V
Vladimir Kozlovsky, 2016-05-15
@vladkozlovsky

It's simple: if you want to completely pretend to be a browser, then you need to become a real browser. For the most complex cases, I use the https://github.com/niklasb/dryscrape package. In a nutshell, this is a binding to WebKit.
Checks can be very different: from the usual check of the User-Agent header to AJAX requests with parameters generated by JavaScript in the browser.

V
Vlad Zhivotnev, 2016-05-15
@inkvizitor68sl

chrome -> f12 -> network -> refresh page -> copy as curl

D
DevMan, 2015-07-11
@TheUnity

ITC Machine Cyrillic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question