TV Scramble Version 1.0

Overview:

I often find myself re-watching TV shows all the time, sometimes for entertainment purposes, but mostly for background noise while working on projects or cleaning. I don’t need to pay attention, but I can stop for a few seconds here and there to watch my favorite moments.

I wanted to change how I watched all of this content; I wanted a ‘randomness’ to how I watched the shows. This would remove the context built up in watching an entire season at a time, forwards or backwards.

I want a randomness aspect to watching TV shows.

Around this time, I was also working on reviewing my python skills and wanted to work more with API’s. I thought this would be the perfect opportunity to write some code!

Technical:

This project uses the BeautifulSoup API to gather the information from IMDB.

This package includes three pieces of code:

  1. episodeSearch.py

  2. seasons.py

  3. TVscramble.py

You need to run the episodeSearch script first to generate a CSV file with your own shows in it so that TVScramble can be run to generate a random episode. All you need to do is find the “show code” and add it to the ‘shows’ list in the code.

To add shows:

Navigate to the show list and create a show with the code found in the url on IMDB, it should look like this one from the show Monk:

https://www.imdb.com/title/tt0312172/episodes?season=1

the "tt0312172" is the show code.

If you run into any badChars in the title of the episode, it can causes the program to stop running midway. Here is the table I use to locate the badChars and they can be added to badChars dictionary, located at the top of the code.

The main code works by generating a random number, and pulling the associated episode from the CSV file.

There are plans to improve the project, and make it so that the user no longer needs to manually search for a show code. In addition I want to create an add shows to list feature, and a create new list that can be named.

You can download my code here.

Next
Next

Automated Hand Rigging Tool for Maya