Python Forum

Full Version: requests.post() does work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I started very recently in "python" and especially in "sraping" for work.
I connect to the site: "https:/ip/login" for authentication, no worries.
Once connect, I enter a user file: "1 Png"
I would like from this URL send a request (POST)
The problem is that the query format the browser sends does not look like the standard.
What do you think?
with requests.session() as s:
    url = 'https://IP/index.php#'
    s.get(url,verify=False)
    login_data= {'login':'login','ID':"pwd"}
    s.post(url, data=login_data)

    postData= {"userfeatures[lastname]":"test"}
    s.get('https://192.168.30.242//service/ipbx/index.php/pbx_settings/users/?act=edit&id=325',verify=False)
    s.post('https://192.168.30.242//service/ipbx/index.php/pbx_settings/users/?act=edit&id=325', data=postData)
I'm not sure what problem you're having. What exactly do you mean by, "the query format the browser sends does not look like the standard"? Can you explain in more detail what's going wrong?