0
我做錯了什麼?我之前已經刮過網站,但這個有效載荷對我來說很困難。Python請求如何正確使用post請求的有效負載
from requests import session
from bs4 import BeautifulSoup as bs
payload = {
"p_flow_id" : 838 ,
"p_flow_step_id": 4 ,
"p_instance" :1282563643133 ,
"p_page_submission_id" :4990502617229,
"p_request" : ""
}
with session() as c:
c.post('http://nid.usace.army.mil/cm_apex/f?p=838:4:0::NO/wwv_flow.accept', data=payload)
url = c.get('http://nid.usace.army.mil/cm_apex/f?p=838:4:0::NO/wwv_flow.accept')
html = url.content
soup = bs(html)
您可能要加試/除非檢查請求返回200或沒有,如果它不處理異常「T。 – cbll