V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xummerj
V2EX  ›  问与答

谁能帮我看下这个网站要怎么爬

  •  
  •   xummerj · 2017-03-10 11:36:35 +08:00 · 1883 次点击
    这是一个创建于 2813 天前的主题,其中的信息可能已经有所发展或是发生改变。

    http://www.zejiri.net/jiehunzeri.html

    我用 postman 发现返回的是

    <script>alert('服务器繁忙,请稍后再试!');window.location.href='http://www.zejiri.net'</script>
    
    

    试了带 cookie 和 header 好像也不行,哪里不对吗? 附上 postman 配置 json

    {
    	"variables": [],
    	"info": {
    		"name": "test",
    		"_postman_id": "59b689a7-bb8a-1aba-5d4f-f5fc2a6a745f",
    		"description": "",
    		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
    	},
    	"item": [
    		{
    			"name": "http://www.zejiri.net/jiehun.aspx",
    			"request": {
    				"url": "http://www.zejiri.net/jiehun.aspx",
    				"method": "POST",
    				"header": [
    					{
    						"key": "User-Agent",
    						"value": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
    						"description": ""
    					},
    					{
    						"key": "Upgrade-Insecure-Requests",
    						"value": "1",
    						"description": ""
    					},
    					{
    						"key": "Cookie",
    						"value": "safedog-flow-item=4EDD2CE8C213FD7DB9AEA5F83A3ED6C0; AJSTAT_ok_pages=3; AJSTAT_ok_times=2",
    						"description": ""
    					},
    					{
    						"key": "Content-Type",
    						"value": "application/x-www-form-urlencoded",
    						"description": ""
    					},
    					{
    						"key": "Origin",
    						"value": "http://www.zejiri.net",
    						"description": ""
    					},
    					{
    						"key": "Host",
    						"value": "www.zejiri.net",
    						"description": ""
    					},
    					{
    						"key": "Accept",
    						"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
    						"description": ""
    					},
    					{
    						"key": "Proxy-Connection",
    						"value": "keep-alive",
    						"description": ""
    					}
    				],
    				"body": {
    					"mode": "urlencoded",
    					"urlencoded": [
    						{
    							"key": "",
    							"value": "",
    							"type": "text",
    							"enabled": true
    						}
    					]
    				},
    				"description": ""
    			},
    			"response": []
    		}
    	]
    }
    
    3 条回复    2017-03-10 13:16:20 +08:00
    xummerj
        1
    xummerj  
    OP
       2017-03-10 12:52:11 +08:00
    有人吗?
    phpinfo
        2
    phpinfo  
       2017-03-10 12:52:54 +08:00   ❤️ 1
    ```

    Generated from a curl request:
    curl 'http://www.zejiri.net/jiehun.aspx' -H 'Cookie: safedog-flow-item=4EDD2CE8C213FD7DB9AEA5F83A3ED6C0; safedog-flow-item=4EDD2CE8C213FD7DB9AEA5F83A3ED6C0; AJSTAT_ok_pages=5; AJSTAT_ok_times=1' -H 'Origin: http://www.zejiri.net' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://www.zejiri.net/jiehun.html' -H 'Connection: keep-alive' --data 'xn_xingming=%C4%EF%C4%EF%C4%EF&xl_xingming=%C4%EF%C4%EF%C4%EF&xn_n=1983&xn_y=06&xn_r=15&xn_s=12&xn_f=30&prov=%B1%B1%BE%A9&city=%B1%B1%BE%A9&county=%B6%AB%B3%C7%C7%F8&xl_n=1985&xl_y=06&xl_r=15&xl_s=12&xl_f=30&prov2=%B1%B1%BE%A9&city2=%B1%B1%BE%A9&county2=%B6%AB%B3%C7%C7%F8&xl_n_fu=NO&xl_y_fu=NO&xl_r_fu=NO&xl_s_fu=NO&xl_f_fu=NO&xl_n_mu=NO&xl_y_mu=NO&xl_r_mu=NO&xl_s_mu=NO&xl_f_mu=NO&xn_n_fu=NO&xn_y_fu=NO&xn_r_fu=NO&xn_s_fu=NO&xn_f_fu=NO&xn_n_mu=NO&xn_y_mu=NO&xn_r_mu=NO&xn_s_mu=NO&xn_f_mu=NO&jr_n=2010&jr_y=06&jr_r=15&jr_s=12&jr_f=30&prov3=%B1%B1%BE%A9&city3=%B1%B1%BE%A9&county3=%B6%AB%B3%C7%C7%F8&Submit=%BF%AA%CA%BC%C3%E2%B7%D1%BD%E1%BB%E9%D4%F1%BC%AA%C8%D5' --compressed

    ```

    正常, 你看看是不是弄错成 GET 了
    xummerj
        3
    xummerj  
    OP
       2017-03-10 13:16:20 +08:00
    @phpinfo 呃,好像少了个 Referer...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2908 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 00:19 · PVG 08:19 · LAX 16:19 · JFK 19:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.