私はPython
とSelenium
とFirefox
を使用してコンテンツを取得しています。ScrapyとSeleniumを使用したPython JavaScriptを取得する
<html>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" onResize="resize();" bgcolor="#ffffff">
<iframe id="iframe" align="center" width="100%" height="100%" frameborder="0" marginWidth="0" marginHeight="0" src="" style="margin-top:1px;margin-left:1px;"></iframe>
</body>
<script>
var eventTime = new Date();
function activeEvent() {
eventTime = new Date();
}
var height = 0;
var width = 0;
resize();
function setTitle(message) {
document.title = message;
}
function resize() {
height = document.body.clientHeight - 2;
width = document.body.clientWidth - 2;
if (height < 480) height = 480;
if (width < 640) width = 640;
document.getElementById("iframe").height = height;
document.getElementById("iframe").width = width;
}
setInterval("resize()", 1000);
document.getElementById("iframe").src = "http://xxxxxx.com:80/lhscm/framework/mainform/navui/nav3mainform.do?height=" + height + "&width=" + width;
</script>
</html>
をしかしsrc
リンクを取得することはできませんセレンdriver.page_source
を使用してHTML
を生成:ウェブサイトHTML
は以下の通りです。
コンテンツを取得するにはどうすればよいですか?
私はfirefox firebugを使用して、私はhtml要素を取得できます! –