Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Automate api call | Willing to pay

Been trying to figure this out for a while now but I just can't seem to get it right. On reservecalifornia.com/Web/ you can reserve camping spots that do cost money to do so. All I am looking for is the automation of the API call tied to the button called "Book Now" that's it. I do not need to automate the checkout or purchase portion, just the "Book Now" button. The API URL tied to that button is "reservecalifornia.com/Web/connect.aspx" and on a successful post request it should redirect you to this URL "reservecalifornia.com/Web/Facilities/SelectReservationPreCart.aspx". The code I have linked below already has the account login part automated and at the bottom has my failed attempt at making a successful post request for "Book Now". If you can figure out what I am doing wrong let me know and tell me the price.

Code: pastebin.com/yNFp160T
Shouldn't be too hard, do you have discord or can open private messages on here yet?
(Feb 22, 2022 02:31 PM)skinnypete2 Wrote:  Skinny Pete#6719

Okay sent you a request.
Still in need of assistance with this problem. Feel free to add my discord above, shoot me a pm, or reply here
(Mar 6, 2022 05:56 PM)skinnypete2 Wrote:  Still in need of assistance with this problem. Feel free to add my discord above, shoot me a pm, or reply here

Hey @skinnypete2 - the pastebin address in the OP is dead.  Would you mind re-uploading?
It is doable, but you will need to use multiple types of doing the whole shebang.
(Feb 22, 2022 02:15 PM)skinnypete2 Wrote:  Been trying to figure this out for a while now but I just can't seem to get it right. On reservecalifornia.com/Web/ you can reserve camping spots that do cost money to do so. All I am looking for is the automation of the API call tied to the button called "Book Now" that's it. I do not need to automate the checkout or purchase portion, just the "Book Now" button. The API URL tied to that button is "reservecalifornia.com/Web/connect.aspx" and on a successful post request it should redirect you to this URL "reservecalifornia.com/Web/Facilities/SelectReservationPreCart.aspx". The code I have linked below already has the account login part automated and at the bottom has my failed attempt at making a successful post request for "Book Now". If you can figure out what I am doing wrong let me know and tell me the price.

Code: pastebin.com/yNFp160T

import requests

url = "https://reservecalifornia.com/Web/Default.aspx/GetRestrictionRDR"
data = "{"ArrivalDate":"2022-05-24","nights":1,"unitId":53797,"facilityId":"516","placeId":"659","categoryId":1,"unitTypeId":0}"
[Image: lolcard.jpg]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by TilcayoMar 16, 2020 04:20 AM 2 126 Mar 16, 2020 04:20 AM
Last Post: Tilcayo
[Python] by george12324Jun 23, 2019 02:32 PM 15 370 Jun 23, 2019 02:32 PM
Last Post: george12324
[Python] by MercuryMar 29, 2019 04:29 AM 3 178 Mar 29, 2019 04:29 AM
Last Post: Dark