日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python post有随机字符串_如何用python requests post一段字符串

發(fā)布時間:2024/9/30 python 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python post有随机字符串_如何用python requests post一段字符串 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我要post一段數(shù)據(jù),正確的瀏覽器post數(shù)據(jù)如下POST /boss/gridturnpage?action=refresh&pk=-1&condition=custCode%3D%26businessId%3D-1%26beginlogDate%3D2015-04-20%26endlogDate%3D2015-04-20%26opId%3D%26orgId%3D&tmpPercentWidth=1028&localcache=table&url_source=XMLHTTP HTTP/1.1

Accept: */*

Content-Type: multipart/form-data

Referer: http://10.81.0.3:8080/boss/boss/so/soinfomgr/QryOrdSoRecord.jsp

Accept-Language: zh-cn

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)

Host: 10.81.0.3:8080

Content-Length: 1255

DNT: 1

Connection: Keep-Alive

Cache-Control: no-cache

Cookie: USERINFO_ATTR=AppframeSerial_12959; CRM_WEB=MJmjV0yh1nzRTVJNTnT1ZTF3mjpLTwGLnkL9wxzy1Fjkk6p5GKGP!-257094400

tableid="tblOffer" setname="com.asiainfo.boss.common.web.solog.SETOrdHistory" tablemodel="com.ai.appframe2.web.datamodel.MethodModelForService" implservice_name="com.asiainfo.boss.so.order.base.service.interfaces.IBusiOrderQuerySV" implservice_querymethod="getQOrdSoLogValues(String custCode,long businessId,String beginlogDate,String endlogDate,String opId,String orgId,int $STARTROWINDEX, int $ENDROWINDEX)" implservice_countmethod="getQOrdSoLogValuesCount(String custCode,long businessId,String beginlogDate,String endlogDate,String opId,String orgId)"

multiselect="false" isquerycount="TRUE" rowsequence="true" width="100%" height="180" pagesize="50" >

下面是我的代碼,boss.txt內(nèi)容就是

"Referer":"http://10.81.0.3:8080/boss/boss/so/soinfomgr/QryOrdSoRecord.jsp",

"Accept-Language":"zh-cn",

"Accept-Encoding":"gzip, deflate",

"DNT":"1"}

s.headers.update(headers2)

files = {'':('',open(r'f:\boss.txt', 'rb'))}

files== urllib.parse.urlencode(files).encode(encoding="gbk")

r=s.post(url='http://10.81.0.3:8080/boss/gridturnpage?action=refresh&pk=-1&condition=custCode%3D%26businessId%3D-1%26beginlogDate%3D2015-04-16%26endlogDate%3D2015-04-17%26opId%3D%26orgId%3D&tmpPercentWidth=1011&localcache=table&url_source=XMLHTTP',files=files)

下面我post的抓包,怎樣才能將數(shù)據(jù)正確的post上去?

總結(jié)

以上是生活随笔為你收集整理的python post有随机字符串_如何用python requests post一段字符串的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。