Answer the question
In order to leave comments, you need to log in
Download site page, requires JS?
Tell me in which direction to move, you need to download the page, but when downloading with wget, it gives the following thing:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; " />
<script>
document.cookie='_ddn_intercept_2_=183a18e779c8a3f5fce99745e69c59e7; max-age=604800; path=/';
var nc = function() {return document.cookie.indexOf('_ddn_intercept_2_=183a18e779c8a3f5fce99745e69c59e7')==-1;};
var w = function() {document.body.innerHTML = document.getElementsByTagName('noscript')[0].textContent;};
if (!window.opera) {
if (!nc()) {window.location.reload(true);}
var r = function() {if (nc()) w();};
} else {
var r = function () {
if (!nc()) {window.location.reload(true);}
else {w();}
}
}
</script>
</head>
<body onload="r()">
<noscript>You have to turn on javascript and cookies support in browser to visit this site.<br/>
Для посещения этого сайта необходима поддержка javacript и cookies Вашим браузером<br/>
<a href="http://ddos-guard.net">ddos-guard.net</a>
</noscript>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
You can emulate a browser using Selenium:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get(raw_input("адрес страницы"))
html_text = browser.page_source # нужный текст
document.cookie='_ddn_intercept_2_=183a18e779c8a3f5fce99745e69c59e7; max-age=604800; path=/';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question