苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 7039|回复: 5

[HttpHelper] httphelper支持这样的格式上传文件吗?参数怎么传?

[复制链接]
发表于 2017-10-18 19:03:34 | 显示全部楼层 |阅读模式
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="id"

WU_FILE_0
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="name"

Chrysanthemum.jpg
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="type"

image/jpeg
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="lastModifiedDate"

Tue Jul 14 2009 13:32:31 GMT+0800 (中国标准时间)
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="size"

879394
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="chunks"

2
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="chunk"

1
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="mediatype"

pic
------WebKitFormBoundaryGAzai0e2ay5kpRBq
Content-Disposition: form-data; name="uploadmediarequest"



1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2017-10-18 20:05:29 | 显示全部楼层
直接写Post应该就行了。看抓包,根据数据找到对应的参数进行填 写
发表于 2017-10-18 20:05:41 | 显示全部楼层
或者你给个链接我看看
 楼主| 发表于 2017-10-19 09:08:33 | 显示全部楼层
站长苏飞 发表于 2017-10-18 20:05
或者你给个链接我看看

回复老大这是微信网页版给好友发送文件。我只能讲谷歌控制台的信息粘贴出来:
1.请求地址和方法
Request URL:https://file.wx.qq.com/cgi-bin/m ... xuploadmedia?f=json
Request MethodOST
Status Code:200 OK
Remote Address:183.61.49.165:443

2.服务器头信息:
Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:https://wx.qq.com
Connection:keep-alive
Content-Length:789
Date:Thu, 19 Oct 2017 01:04:07 GMT
Server:nginx
3.请求头:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Content-Length:356965
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryl4iP7VPyLZYa20zi
Cookie:pgv_pvi=2888671232; RK=sL0/CyX/Hl; webwxuvid=22dc79480d06651a7d323b9f017e89ec122b60cc5776e6bcfdc9f5a29935ffeb7a1fa47b84ad0f4b1a04c76a2b75f8fc; tvfe_boss_uuid=2ff5650869ff8b59; ptcz=74de112bc880c727ed18b8368b62b837aca098e229e4b11a246662d5556cbdc2; pt2gguin=o0392223903; o_cookie=392223903; pgv_pvid=; mm_lang=zh_CN; webwx_auth_ticket=CIsBEMCK0HQagAHZh5o7nTk9BCyuNqWxSJTt/tmYl4PItJmH9660bmCoZpbRnFKG7/0jpLKWqUodnmVId1miPuie95ko4R+Fay2IA3LuEIR8PEKdW8HlsNt4QQWRxq570YrcxmUPDeom0B0XAn7hVKjTH+Gn7Q1LI4DadKATOq25Ej/S+BvpaHuJdg==; wxloadtime=1508375023_expired; wxpluginkey=1508373122; wxuin=1437516621; wxsid=crvRMdeVCeck7VSO; webwx_data_ticket=gSeMTpeEld20Hr92zukOlYEs
Host:file.wx.qq.com
Origin:https://wx.qq.com
Referer:https://wx.qq.com/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

4.get中的参数
f:json
5.发送的数据:
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="id"

WU_FILE_0
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="name"

Chrysanthemum.jpg
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="type"

image/jpeg
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="lastModifiedDate"

Tue Jul 14 2009 13:32:31 GMT+0800 (中国标准时间)
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="size"

879394
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="chunks"

2
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="chunk"

1
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="mediatype"

pic
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="uploadmediarequest"

{"UploadType":2,"BaseRequest":{"Uin":1437516621,"Sid":"crvRMdeVCeck7VSO","Skey":"@crypt_f01eb2d0_8604358451b799de18291f6cd4f8ae95","DeviceID":"e341313097297103"},"ClientMediaId":1508375042215,"TotalLen":879394,"StartPos":0,"DataLen":879394,"MediaType":4,"FromUserName":"@355fabf250fbb85eddc229027fe516d131b9a9096e46977e334d33eae01d3a32","ToUserName":"filehelper","FileMd5":"076e3caed758a1c18c91a0e9cae3368f"}
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="webwx_data_ticket"

gSeMTpeEld20Hr92zukOlYEs
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="pass_ticket"

86KCADbaOfb+L+kIiKiGgaxFPU6aJ29LQaVUVB16Jg3AHtNIaRWnmSk770XVJyUm
------WebKitFormBoundaryl4iP7VPyLZYa20zi
Content-Disposition: form-data; name="filename"; filename="Chrysanthemum.jpg"
Content-Type: application/octet-stream





发表于 2017-10-19 09:54:12 | 显示全部楼层
当成字符串直接发就行了,
发表于 2017-10-19 09:54:29 | 显示全部楼层
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-12-27 04:17

© 2014-2021

快速回复 返回顶部 返回列表