'crawl website with requests and problem is Object.setPrototypeOf
i'm trying to crawl website with python requests GET and having problem with Object.setPrototypeOf i added userAgent in header but it still gives me under code i think the problem is Object.setPrototypeOf part. is it corrent? i need a solution
var isSupportedBrowser = navigator.userAgent.indexOf('MSIE') === -1 && typeof Object.setPrototypeOf !== 'undefined';
if (!isSupportedBrowser) {
location.replace('/not-supported-browser');
}
i'm trying not to use selenium
Solution 1:[1]
That's JavaScript code. To run that code, you need a JavaScript engine. Whether you use one included in a browser or write one yourself is up to you. requests does not include a JavaScript engine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sören |