Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
requests.post() does work
#1
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)

Attached Files

Thumbnail(s)
   
Reply
#2
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  POST requests - different requests return the same response Default_001 3 1,957 Mar-10-2022, 11:26 PM
Last Post: Default_001
Brick how to work with 2 or more related tables in a Post request ikurorox 0 1,407 Dec-05-2021, 01:01 AM
Last Post: ikurorox
  requests issue with post on dot_net api Heinrich 1 2,495 Jan-23-2020, 04:28 AM
Last Post: Larz60+
  Making several POST requests RayeEThompson507 1 2,621 Nov-25-2019, 08:50 PM
Last Post: micseydel
  requests post/get to HTML form mrdominikku 1 2,339 Nov-03-2019, 07:12 PM
Last Post: Larz60+
  Error in requests.post debanilroy 3 5,440 Sep-18-2018, 06:15 PM
Last Post: snippsat
  How do i loop through list of data from CSV file and post requests in aspx dynamics w Prince_Bhatia 1 6,101 Nov-09-2017, 02:53 PM
Last Post: heiner55
  [SOLVED] requests returning HTTP 404 when I follow a link after I do a POST JChris 9 27,934 Nov-14-2016, 02:23 PM
Last Post: JChris

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020