25,970
社区成员




请求 URL:
http://www.gfex.com.cn/u/interfacesWebTiDayQuotes/loadList
请求方法:
POST
状态代码:
200 OK
远程地址:
[2409:8c4c:e00:2011:33::52]:80
引用站点策略:
strict-origin-when-cross-origin
Age:
0
Cache-Control:
no-cache
Connection:
keep-alive
Content-Type:
application/json;charset=UTF-8
Date:
Fri, 06 Dec 2024 02:43:06 GMT
Eo-Cache-Status:
MISS
Eo-Log-Uuid:
11303713761434026797
Expires:
Thu, 01 Jan 1970 00:00:00 GMT
Pragma:
no-cache
Server:
nginx
Set-Cookie:
Path=/; Secure; HttpOnly
Set-Cookie:
Path=/; Secure; HttpOnly
Transfer-Encoding:
chunked
Via:
http/1.1 GFEX (GFEX [cMsSf ])
X-Content-Type-Options:
nosniff
X-Content-Type-Options:
nosniff
X-Frame-Options:
SAMEORIGIN
X-Frame-Options:
DENY
X-Xss-Protection:
1; mode=block
X-Xss-Protection:
1; mode=block
Accept:
application/json, text/javascript, */*; q=0.01
Accept-Encoding:
gzip, deflate
Accept-Language:
zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
Connection:
keep-alive
Content-Length:
32
Content-Type:
application/x-www-form-urlencoded; charset=UTF-8
Cookie:
JSESSIONID=07714FD8659205AA8A3EC52D66682501; SF_cookie_3=68941398; _yfxkpy_ssid_10009067=%7B%22_yfxkpy_firsttime%22%3A%221733451183919%22%2C%22_yfxkpy_lasttime%22%3A%221733451183919%22%2C%22_yfxkpy_visittime%22%3A%221733452985237%22%2C%22_yfxkpy_cookie%22%3A%2220241206101303923178523200069355%22%7D
Host:
www.gfex.com.cn
Origin:
http://www.gfex.com.cn
Referer:
http://www.gfex.com.cn/gfex/rihq/hqsj_tjsj.shtml
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
X-Requested-With:
XMLHttpRequest
{code: "0", msg: "接口访问成功!", param: {trade_date: ["20241206"], trade_type: ["0"]}, data: [,…],…}
但我直接访问 http://www.gfex.com.cn/u/interfacesWebTiDayQuotes/loadList 页面错误。
请问我如何 采集到这个页面数据?
我只要简单采集这个页面,不是手工啊,否则我也不会问
这个网站怎么没人发帖的啊
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
$session.Cookies.Add((New-Object System.Net.Cookie("fqYLVbsaziaNS", "60rM6nHZBqvaccCq1lcZ6x97D2uJ5hsSHeaqYi78qtHxKUd.oVbKISa4YOGNg2MvYAbv1eM2GueFUpQFfzolr1Rq", "/", "http://www.czce.com.cn")))
$session.Cookies.Add((New-Object System.Net.Cookie("UM_distinctid", "1939ef210d1486-0dd0062d2b14fb-4c657b58-1fa400-1939ef210d2700", "/", ".czce.com.cn")))
$session.Cookies.Add((New-Object System.Net.Cookie("CNZZDATA1264458526", "113467313-1733538484-%7C1733542148", "/", "http://www.czce.com.cn")))
$session.Cookies.Add((New-Object System.Net.Cookie("fqYLVbsaziaNT", "0KtTkio2kasCC6MZztC3knFF07WZZhuXC52irzZgIBrxvHCLO1ADkCsRBSY5vAZF.yfwj6i3GAmVGuLbxNvnY37_NWCEYSkZ0JYkgBxj_n57X8MMoDnIsXZv_04IVboxiWNTU21u8ymNCf5xP1Mx9fOrchU9QMCdSVwUu1jGk5DyX0qzO9LOAearqLT.7WyY4pJrmh39wiOex3.Znzvjrd7TyQDdsiC_8aBoIpqxKg1CTyDSl1ceZDzugCGYazYR3B7mM8ktXatBt_raKk73Cn9AJPNBoPkNJ5XOhK5a8dQiE86dJ37tFoiZBSIoZQiUuK9AAvTCKxCa0wHiBxbwitZUTu64zRNwrco5nG58pNALk4AFHBuHCvDUqgWr8Wu6nD36Vx8K2XPgJjyIJeN30xG", "/", "http://www.czce.com.cn")))
$response =Invoke-WebRequest -UseBasicParsing -Uri "http://www.czce.com.cn/cn/DFSStaticFiles/Future/2024/20241206/FutureDataDaily.htm%22 -WebSession $session
-Headers @{
"Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7"
"Accept-Encoding"="gzip, deflate"
"Accept-Language"="zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
"Cache-Control"="max-age=0"
"Upgrade-Insecure-Requests"="1"
}
$outputFile = "e:\czce_outputfile.txt" # 替换为你想保存的文件路径
Out-File -FilePath $outputFile -InputObject $response.Content
郑商所 这个网页爬不了, 帮我看看是什么问题,呵呵
呵呵
我是C++语言,清问简单抓取这样一个页面,需要用到什么库吗? 用curl下载行不行?
麻烦各位大佬,我很急。
, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
X-Requested-With:
XMLHttpRequest
{code: "0", msg: "接口访问成功!", param: {trade_date: ["20241206"], trade_type: ["0"]}, data: [,…],…}
调试器显示数据成功返回,核对数据也是对的嘛。
但我直接访问 http://www.gfex.com.cn/u/interfacesWebTiDayQuotes/loadList 页面错误。难道不能直接访问嘛? 简单说下,需要做些什么