https://github.com/danialjivraj/booking-shift-webscraper
webscrapes a booking shift webpage using selenium and sends a notification of available shifts in a text channel via discord bot
https://github.com/danialjivraj/booking-shift-webscraper
danialjivraj python python-script python-webscraping
Last synced: 10 months ago
JSON representation
webscrapes a booking shift webpage using selenium and sends a notification of available shifts in a text channel via discord bot
- Host: GitHub
- URL: https://github.com/danialjivraj/booking-shift-webscraper
- Owner: danialjivraj
- Created: 2023-10-23T18:00:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T16:34:42.000Z (almost 2 years ago)
- Last Synced: 2025-02-15T03:24:52.380Z (12 months ago)
- Topics: danialjivraj, python, python-script, python-webscraping
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# booking-shift-webscraper
## Jen
Jen is a Discord bot that collects web-scraped data from a booking shift webpage using Selenium.
This data is then transmitted as notifications detailing available shifts/booked days to a designated text channel on Discord.
The script offers flexibility through a set of boolean flags that allow the user to specifically choose their preferred settings.
## Webscraped Website
This website operates on a first-come, first-served basis for booking shifts.
Reserved shifts can be canceled up to two days before the shift.
However, if a particular day and shift are fully booked and someone cancels, the newly available shift isn't automatically made known to everyone.
## Website Preview

### Clicking on a day with available shifts

### Clicking on a day which has been booked

## Script Features
- Shift Availability Notification
- Notifies users in real-time about available and booked shifts on specified days, as well as having the ability to look for specific shifts, for example "10:00 - 18:00" on a Saturday.
- Automatic Booking
- Can automatically book desired shifts based on predefined script selection.
- Shift Filtering
- Filters shifts based on specific days and shifts, allowing users to focus on preferred time slots.
- User Interaction
- Listens to the script commands entered by the user in a Discord channel and runs the program accordingly.
- Discord Embed Messages
- Sends formatted Discord embed messages containing shift details and clickable links for quick action.
## Dependencies
- discord.py
```
pip install discord.py
```
- selenium
```
pip install selenium
```
- python-dotenv
```
pip install python-dotenv
```
### Chrome Driver
The latest version of [Chrome Driver](https://googlechromelabs.github.io/chrome-for-testing/) is needed.
The path needs to be set up properly in `chromeDriverMode.py`.
## Commands
- **f:** Filter available and booked shifts and send both booked and available days.
- **fa:** Filter available shifts only and send available days only (no booked days).
- **af:** Automatically book desired shifts, filter available and booked shifts.
- **afa:** Automatically book desired shifts, filter available shifts only (no booked days).
- **afb:** Automatically book desired shifts, filter booked days only (no available days).
- **a:** All available and booked shifts and send both booked and available days.
- **aa:** All available days and send only available days (no booked days).
- **a a:** Automatically book desired shifts, all available and booked shifts.
- **a aa:** Automatically book desired shifts, all available shifts only (no booked days).
- **a ab:** Automatically book desired shifts, all booked days only (no available days).
- **b:** Retrieve booked days only (loops once).
- **s:** Stop the bot and halt all executions.
## Preview




