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


Messages In This Thread
requests.post() does work - by Alto - Aug-11-2021, 01:01 PM
RE: requests.post() does work - by ndc85430 - Aug-13-2021, 07:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  POST requests - different requests return the same response Default_001 3 2,057 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,492 Dec-05-2021, 01:01 AM
Last Post: ikurorox
  requests issue with post on dot_net api Heinrich 1 2,543 Jan-23-2020, 04:28 AM
Last Post: Larz60+
  Making several POST requests RayeEThompson507 1 2,672 Nov-25-2019, 08:50 PM
Last Post: micseydel
  requests post/get to HTML form mrdominikku 1 2,381 Nov-03-2019, 07:12 PM
Last Post: Larz60+
  Error in requests.post debanilroy 3 5,529 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,150 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 28,337 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