Skip to content

Workshop introducing web bots with `webbrowser` and `selenium` ran multiple times at University of Illinois at Urbana Champaign and University of Melbourne.

License

Notifications You must be signed in to change notification settings

harsh183/sail21-whacky-web-bots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wacky Web Bots Workshop

Learn about embracing the power of web browsers, all powered by the magic of Python. In this workshop, you will learn about using webbrowser and selenium to take control of your web browser via Python commands. Web automation is useful for automated testing, scraping data, getting concert tickets, filling in tedious forms or just making your life easier. This is also a helpful skill in the industry where small automation scripts can generate lots of business value, like automating tedious jobs or generating leads. Plus, it's flashy and fun to show to people :)

CC0-1.0 License - aka reuse it for whatever. If you do use it I'd like to see it though :)

Setup

Follow these two steps before the workshop. There is some time at the start to sort out some issues but it's better to come prepared.

Install Python3

Install Selenium

If you did python3 earlier instead of python here you will have to use pip3 instead of pip.

pip install selenium
pip install webdriver_manager

University of Melbourne DSC Version

Slides are here and the programs are here.

CS 125 Version

Slides are here and the programs are here.

UIUC SAIL 2021 Version

Slides are here and the programs are the programs are here.

Outline

Opening web browsers

(using python stdlib webbrowser)

  • Introduction and installation of python
  • Code Along Task: Take a command line argument like CS 125 and open the web browser to the university course explorer page.
  • Exercise: Take a chapter number for the book Automate the Boring Stuff with Python and open directly to that webpage

Selenium

  • Selenium pip install
    • (UIUC SAIL version) Code Along Task: Open up the CS Sail homepage, click the navbar Staff link, hover the mouse on the overlay and select all staff names because we want to make them a thank you card.
    • (CS 125 version) Code Along Task: Open up the CS 125 homepage, click the sidebar, click the people page, select all staff names because we want to make them a thank you card.
    • (Unimelb Version) Code Along Task: Open up the DSC organizers page, click the Organizers Link, select all the staff names because we want to make them a thank you card.
  • Exercise: Get everyone's descriptions/roles as well and print it alongside.
  • Ethical issues
  • Closing remarks

Note: Time adjusted to 1/2 hours as needed.

Dev

Slides in markdown and powered by marp.

Originally made for UIUC CS Sail 21.

Just write the slides and commit. Github actions takes care of the rest via marp-action.

For local compile, we use marp which you can install from npm.

$ marp -I slides/ --output dist/

About

Workshop introducing web bots with `webbrowser` and `selenium` ran multiple times at University of Illinois at Urbana Champaign and University of Melbourne.

Topics

Resources

License

Stars

Watchers

Forks

Languages