webbrowser
built in library to navigate to course pages and book chapters
selenium
to scrape DSC information
I'm Harsh Deep, a junior studying Statistics and Computer Science at UIUC. hdeep2@illinois.edu
I like teaching: I've spent 5 semesters working as CA helping teach intro CS 125.
I also like open source, hci research (human ai teaming and eyetracking), cats, reading and watching interesting animation from around the world.
Almost everything is on the internet now. A gold mine of information exists which can enable us to do so many things.
They're fun and impress people.
Automation lets us save time, prevent errors and lets us focus on more important things.
I used to think they were a gimmick
then in my first tech intership I created three different bots for extracting event info and social media automation
Not only can they make things easier in your life, they can also create business value.
Testing systems automatically
Gathering information from the internet. Most of the internet is not on an API.
Making many poorly organized resources more accessible.
python --version
to check. If it says 2.x
then run code with python3 scriptname.py
If you aren't able to get this to work don't worry. This will all be recorded and the slides are all available online. I'll be open to questions after this session over email as well so feel free to ask me questions then.
pip3
instead if you have been using python3
so far.pip install selenium
pip install webdriver_manager
Don't worry.
This will all be recorded and the slides are all available online.
Ask me questions after email later too.
Make the UIUC Course Explorer Easier to Navigate (20 minutes)
Problem: When you use the UIUC Course Website you can't directly jump to the Course you want
Take command line input - common in real life scenario.
Valid upper case inputs like "CS 125" or "CWL 114".
Final code
We want to jump to chapters of Automate The Boring Stuff with Python
The url for each chapter has the chapter number in the end "https://automatetheboringstuff.com/2e/chapter12/" from 0 to 20 both included.
Command line input automate.py 5
https://gist.github.com/harsh183/4505b4870fb9a003abe5193e0f7b9c71
Run a custom script after the search form was filled out.
Using JavaScript that runs directly on the Browser. Beyond scope of the class but useful.
Get the names of all the wonderful CS 125 Staff
They're an amazing set of people so perhaps we can make them all a nice thank you message.
Final code
Feel free to work with others too. If your set up isn't working feel free to just discuss with others.
We got everyone's names out of the web page, now lets use the same logic to try to get everyone's roles as well.
Use the code we've written so far as a starting point.
Things can get more complex.
Instead of taking command line inputs we can have a GUI or a config file.
More: scrolling, forms, tickets
Test frameworks
You can even incorporate AI into all of this.
Responsible bot development
Automation can automate a lot of jobs.
It is legal but still restricted.
Many companies oppose it while many in the public support it.
People have also started using web bots to get vaccines faster. Want a vaccination appointment? It helps to know a Python programmer
Innovative
But also not everyone has access to this.
free online book (with optional paid videos) that first teaches python from scratch
second half has lots of interesting python projects in automation
Automate the Boring Stuff with Python Chapter 12 goes into far more detail on web bot stuff. I highly reccomend.
Email: hdeep2@illinois.edu