我正在尝试下载网站的源代码。我使它在autoit以及php中工作.... buuut问题是源代码不是完整的。某些脚本生成的一些HTML的HTML没有下载。
我正在研究关于赌场游戏概率的学校项目(特别是轮盘赌)。我想下载这些数字: NUMBERS 从页面:http://csgocircle.com/创建一些统计信息。 我做错了什么?
感谢您的帮助!
的AutoIt:
#include <Inet.au3>
#include <WinHttp.au3>
$url="http://csgocircle.com/"
$http_protocol = ObjCreate("winhttp.winhttprequest.5.1")
$http_protocol.setrequestheader("Content-Type", "application/x-www-form-urlencoded")
$http_protocol.setrequestheader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36")
$http_protocol.open("GET", $url)
$http_protocol.send($cookie)
$http_protocol.waitforresponse
$http_auth3 = $http_protocol.responsebody
ConsoleWrite($http_auth3)
Exit
或PHP:
<?php
$url="http://csgocircle.com/";
$homepage = file_get_contents($url);
echo htmlspecialchars( $homepage );
答案 0 :(得分:0)
在Autoit中,您应该在IE中加载URL并获取完整的HTML。
#include <IE.au3>
$url = "http://csgocircle.com/"
$oIE = _IECreate($url, 0, 0, 1, 0 )
;~ Sleep(2000) ; eventually do sleep in order to wait for JS/AJAX to finish the page
$html = _IEDocReadHTML($oIE)
_IEQuit($oIE)
ConsoleWrite($html)