Inspiration

I was inspired by other people's similar applications and social media bots that would constantly update where the nearest vaccines are for those who need them. I used one of those bots to see where I could get my vaccine, and I thought it was a really cool idea. I hope people find use in my tool, and I hope to add more features in the near future, especially support for other vaccine providers and abilities to see specific locations in a city that have vaccines available.

What I learned

I learned a lot about web scraping in this project. I touched on scraping a little bit in my CS class last semester with Python, and always wanted to use it for more projects. I feel a lot more confident using libraries like selenium and requests now. This experience had made me a lot more confident, and curious in the potential of scraping. Along with this, I also brushed up on implementing GUI's using tkinter again, which I love.

How I built my project

I knew I wanted to scrape either Hyvee or CVS' website, so I chose CVS. First I started off by inspecting the elements of the CVS vaccine website, and I saw that they stored the information for which cities in every state with their availability as a dictionary in a hidden URL with plaintext. I scraped the text using requests, converted it to a dictionary, and took user input to decide which state's cities I wanted to look at. Then I used the state as the key, and printed each city and its' availability. Once I got everything to work, including checking for invalid inputs and states that don't have vaccines available at CVS, I added a GUI. I am very passionate about graphic design and I love it when a program looks good. I used one of tkinter's themes, yaru, and made a simple GUI with an 'About' menu, along with an entry widget to input what state you would like to look at, paired with a Listbox showing each state and its' availability, using a scrollbar. Finally, once everything looked nice and worked, I added a hyperlink at the bottom of the GUI so users can go straight to CVS' website to schedule an appointment!

Challenges

This was very challenging for me as I have not touched Python in quite some time and scraping was one of my weakest topics. I had to look at a lot of documentation, especially for tkinter, and play with CVS' website to see how I could grab the information I needed. I struggled a lot with being able to grab the cities and their availability. But, overall, I am very happy I pursued this project!

Share this project:

Updates