|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
http://ggzy.ah.gov.cn/login.do?method=beginlogin
一开始我想通过XPATH找信息,返回的response.text打开发现是 一堆JS....
然后我想直接通过post请求,发现请求体是payload,于是我查了网上资料
payload = {
"callCount":1,
"page": "/bulletininfo.do?method=showList&fileType=2&hySort=&bulletinclass=jy&num=1&bulletinType=01",
"httpSessionId":"bd33a04f36df7a5e6615df863c83",
"scriptSessionId": "24819EBA1C927DC31DDCA82698484FF0348",
"c0-scriptName":"bulletinInfoDWR",
"c0-methodName":"getPackListForDwr1",
'c0-id':0,
'c0-e1':'string:2',
'c0-e2':'string:',
'c0-e3':'string:jy',
'c0-e4':'string:2',
'c0-e5':'string:02',
'c0-e6':'string:',
'c0-e7':'string:',
'c0-e8':'number:1',
'c0-e9':'string:10',
'c0-e10':'string:true',
'c0-e11':'string:packTable',
'c0-param0':'Object_Object:{id: reference: c0-e1, hySort: reference:c0-e2, bulletinclass: reference:c0-e3, fileType: reference:c0-e4, bulletinType: reference:c0-e5, district: reference:c0-e6, srcdistrict: reference:c0-e7, currentPage: reference:c0-e8, pageSize: reference:c0-e9, isPage: reference:c0-e10, tabId: reference:c0-e11}',
'batchId':2
}
posturl = "http://ggzy.ah.gov.cn/dwr/call/plaincall/bulletinInfoDWR.getPackListForDwr1.dwr"
payloadHeader = {
'Host': 'ggzy.ah.gov.cn',
'Content-Type': 'text/plain'
}
r = requests.post(posturl, data=json.dumps(payload), headers=payloadHeader)
print(r.text)
返回:
throw 'allowScriptTagRemoting is false.';
//#DWR-REPLY
if (window.dwr) dwr.engine._remoteHandleBatchException({ name:'org.directwebremoting.extend.ServerException', message:'The specified call count is not a number' });
else if (window.parent.dwr) window.parent.dwr.engine._remoteHandleBatchException({ name:'org.directwebremoting.extend.ServerException', message:'The specified call count is not a number' });
有没有大神来试一下的。。。到底要怎么爬
|
|