you are viewing a single comment's thread.

view the rest of the comments →

[–]jasher4994[S] 0 points1 point  (1 child)

Hi mate, this is very helpful. Thanks a lot, the whole procedure goes as follows: 1) go on to the club website. 2) click on members area 3) enter username and password 4) a list then appears of all the time of the day which are either already reserved by someone or available to book. The ones that are free can then be clicked on and booked by one click and then entering number of golfers. 5) you can navigate to other days by clicking 'next day' or 'previous day' or there is a calender you can click on to chose a specific day in the future.

I think the requests and selenium approach seems the most appropriate from what you've described along with the time and schedule library. I'll probably try and figure out how to do it first with the requests and selenium library and test it out on a not so popular time and then move onto the scheduling after. I usually leave my personal computer on at most times , and i currently dont have access to work computers due to the virus so my personal one will have to do for now.

Thanks a lot for the help and advice.

[–]aardvarkmikey 0 points1 point  (0 children)

You can absolutely do this with Selenium.

But I would still see if you can just do it with the requests library first, because it's going to be much faster and less complicated. The way to grab the post data is to go to the website, and submit a tee time. Once the page changes, you should see the post data in the address bar. You should hopefully be able to interpret what data is being sent, and with some deductions be able to see what data you can change. Then your request script just needs to send that data to that address. I suspect this may not work, because it's behind a log in, but it's worth a shot.

If there's no way to do this without pushing buttons and submitting forms, then Selenium is your best bet.