Answer the question
In order to leave comments, you need to log in
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
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
See what headers the browser sends (User-Agent and others), and substitute the same ones.
Use cookies.
In especially difficult cases, use Selenium webdriver.
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.
chrome -> f12 -> network -> refresh page -> copy as curl
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question