Browser Controller, Python

WasiUllah Khan
2 min readMar 21, 2019

--

Photo by Christopher Gower on Unsplash

Everyone in the tech community knows that Python is very handy for automating almost anything! So bored me decided to write a 2 line script to open up the backing tracks(I’m a guitarist as well) that I need from YouTube without manually having to search for them.

  1. Execute the Python script.
  2. Links are opened in the browser

To run:

$ python3 script.py

Source Code

Python has a built-in library called webbrowser which opens up links in the browser. In the above code, I’m iterating over a Python dictionary containing all the links and the script opens all the links in new tabs. I stored the dictionary in a separate Python file known as config so that I can easily add new links without having to hard code it again and again.

config file

You can download the script from here.

You can check out my GitHub for more projects!

--

--

WasiUllah Khan

A passionate developer who has a keen interest in reverse engineering.