4 comments
This is actually a great idea. We had the same problem in the university, not for the gym but for booking slots with a professor... that bot would have been so handy!
Yeah it might require some time and work upfront but is definitely worth it!
I enjoyed reading your writing, it was eye-opening I must say but I have a couple of questions to ask : 1) can I automate the bot to make appointments for many people apart from me at the same time, if there are 9 available spaces for just 9 people, can I make appointments for 9 of them at the same time? 2) if number 1 is possible, Will the bot work based on my internet speed or what? 3) what if there's a captcha in place? I'd appreciate your response.
Hi there, great code!!! I am trying to do the same with my university but I am struggling with it, as a complete noob. I wondered if you could quickly look at my problem. Basically, my University is organizing the bookings into a table format. As an example (below) I would like to book Spinning at 12:15 on Thursday 31st of March. The XPATH for the word Spinning is: //*[@id="booking-details"]/tbody/tr[7]/td[2] and it's element is : <td data-bind="text: name" class="name">Spinning</td>
The XPATH for the Select button is: //*[@id="booking-details"]/tbody/tr[7]/td[6]/a and it's element is : <a class="btn primary-color select-booking" data-bind="attr: { 'data-id': id, 'data-start': start }" data-id="TDLH5BQ7GBT01Z3" data-start="Thu Mar 31 2022 12:15:00 GMT+0000">SELECT</a>
I can't simply search for the time as Zumba and Spinning are both that time. There are multiple Spinning as well. But the Spinning i want and my button have the same beginning //*[@id="booking-details"]/tbody/tr[7]/
Do you know how I could find the beginning of the XPATH that matches both and use that to find the button? The table is dynamic and changes according to date and availability.
Any help would be greatly appreciated!!!
Unfortunately as a new user, i can't post screenshots yet. The table is like this:
Thursday 31st March Spinning 07:15 SELECT HiiT 08:15 SELECT Spinning 12:15 SELECT Zumba 12:15 SELECT
I managed to solve my problem with this: driver.find_element_by_xpath("//tbody/tr/td[contains(text(), 'Spinning')]/../td[6]/a[@data-start='Thu Mar 31 2022 12:15:00 GMT+0000']")