自动下载站点的整个源代码
Autoit download whole source of site
我正在尝试下载网站的源代码。我让它在 autoit 和 php 中工作。但是问题是源代码并不完整。 HTML 一些脚本生成的项目未下载。
我正在研究有关赌场游戏(尤其是轮盘赌)概率的学校项目。我想下载这些数字:
NUMBERS
从页面:http://csgocircle.com/ 创建一些统计数据。
我做错了什么?
感谢您的帮助!
自动化:
#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 );
在 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)
我正在尝试下载网站的源代码。我让它在 autoit 和 php 中工作。但是问题是源代码并不完整。 HTML 一些脚本生成的项目未下载。
我正在研究有关赌场游戏(尤其是轮盘赌)概率的学校项目。我想下载这些数字: NUMBERS 从页面:http://csgocircle.com/ 创建一些统计数据。 我做错了什么?
感谢您的帮助!
自动化:
#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 );
在 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)