易顺网

当前位置:首页 > 八爪鱼相关 / 正文
后台-系统设置-扩展变量-手机广告位-内容页头部广告位
作者:admin

如何让八爪鱼采集器实现双文本循环输入?

admin 11个月前(2018-04-22) 八爪鱼相关

目前八爪鱼采集还无法双文本同时输入或者配套输入,

那只能自己想其他方式来实现差不多的效果。

有些机智的同学马上想到,有些查询参数,或关键词会在网址上,

比如,http://www.sdosta.org.cn/index.html

山东技能显网址.png




点击查询后,参数出现在了网址上,

http://124.128.231.226:8888/sdostair/sdosta/searchResult/yanZsWeb?type=web&aac002=69&aac003=96&bzb178=56

对于网址没变化使用异步加载的,需要抓包,

比如http://service.meizu.com/authenticity.html


魅族真伪查询.png



抓包得到的是GET请求,

GET https://cs-api.meizu.com/sn/verify_sn_imei?sn=88CFBMA239YW&imei=867533021898947&is_phone=1&callback=jQuery19103791872454681431_1501037300889&_=1501037300890 HTTP/1.1
Host: cs-api.meizu.com
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 UBrowser/6.1.3228.1 Safari/537.36
Referer: http://care.meizu.com/authenticity.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8


参数在网址上,

https://cs-api.meizu.com/sn/verify_sn_imei?sn=88CFBMA239YW&imei=867533021898947&is_phone=1&callback=jQuery19103791872454681431_1501037300889&_=1501037300890


GET请求大部分都能用八爪鱼打开,

但是有些是POST请求就不好办了?
比如,https://bbs.vivo.com.cn/products.php?mod=verify


抓包信息如下,

POST https://bbs.vivo.com.cn/products.php?mod=verify HTTP/1.1
Host: bbs.vivo.com.cn
Connection: keep-alive
Content-Length: 69
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: https://bbs.vivo.com.cn
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 UBrowser/6.1.3228.1 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: https://bbs.vivo.com.cn/products.php?mod=verify
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: Hm_lvt_9ef7debb81babe8b94af7f2c274869fd=1501055412; Hm_lpvt_9ef7debb81babe8b94af7f2c274869fd=1501055416; KL9d_2132_saltkey=I73o3xQ6; KL9d_2132_lastvisit=1501051839; KL9d_2132_sendmail=1; KL9d_2132_lastact=1501055816%09products.php%09verify; Hm_lvt_a7471116b9007c038d41873ab9121a9e=1501055532,1501055713,1501055796,1501055807; Hm_lpvt_a7471116b9007c038d41873ab9121a9e=1501055807

formhash=a8bb044d&imei=865938036479678&sn=D67AQF600A00&reg_submit=yes


参数不在请求网址里,

怎么办? 我想到是用PHP去模拟请求,
然后将数据返回在页面上,
因为PHP也是网页,所以也可以与八爪鱼融合,
八爪鱼负责操控PHP和提取数据。
为此,我做了一个PHP模拟POST请求台,

网址:http://www.e123456.com/aaaphp/phpgx



界面.png



下面我来简单的演示下,


先将关键参数部分用<<<>>>来框住标识变量,

即将imei=865938036479678&sn=D67AQF600A00&reg_submit

改为

imei=8<<<65938036479678&sn=d67aqf600a00>>>&reg_submit即可


修改后的数据包如下,


POST https://bbs.vivo.com.cn/products.php?mod=verify HTTP/1.1
Host: bbs.vivo.com.cn
Connection: keep-alive
Content-Length: 69
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: https://bbs.vivo.com.cn
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 UBrowser/6.1.3228.1 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: https://bbs.vivo.com.cn/products.php?mod=verify
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: Hm_lvt_9ef7debb81babe8b94af7f2c274869fd=1501055412; Hm_lpvt_9ef7debb81babe8b94af7f2c274869fd=1501055416; KL9d_2132_saltkey=I73o3xQ6; KL9d_2132_lastvisit=1501051839; KL9d_2132_sendmail=1; KL9d_2132_lastact=1501055816%09products.php%09verify; Hm_lvt_a7471116b9007c038d41873ab9121a9e=1501055532,1501055713,1501055796,1501055807; Hm_lpvt_a7471116b9007c038d41873ab9121a9e=1501055807

formhash=a8bb044d&imei=8<<<65938036479678&sn=d67aqf600a00>>>&reg_submit=yes



接着把修改好了的数据包填入php模拟请求,抓包数据,方框中,

然后将关键参数65938036479678&sn=D67AQF600A00填入,请求参数,方框,


post循环输入.png


提交数据后,成功返回截图。



post返回源码.png


如果你要好看点,可以开启网页模式,将返回的源代码以浏览器的形式显示出来,

但这里仅还原源代码,并不做二次网络加载,有些加载不出来,一般都不开启。

将网页模式改为1即可开启,


网页模式.png


返回网页模式截图,


返回网页.png



总结:上述几种方法,其实就是把多个参数合成一个变量,

使八爪鱼采集器能输入这些参数,

从而以另一种形式来实现联合查询。








标 签

试试用"←"或"→"方向键快速翻页把 (^o^)/

后台-系统设置-扩展变量-手机广告位-内容页头部广告位
搜索
热门图片
最近更新

Powered By 易顺网  赣ICP备16001451号