Skip to content

A Python script that reads movie names from a file and creates a file having IMDb ratings for each movie.

Notifications You must be signed in to change notification settings

sankalp-sangle/imdb_finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

IMDb_finder

WhyuseIMDb

Ever obtained a huge collection of Movies and don't know where to start watching? You are at the right place! A Python script that reads movie names from a specified directory and creates a file having IMDb ratings for each movie. The script further sorts the list into ascending/descending order as well.

(Disclaimer : I do not agree that IMDb ratings are the best judge of a movie ;) )

This script scrapes IMDb ratings for each movie and lists them in a file. Here is a non-exhaustive list of movies that I had : Movie list

Here is the ratings file that the script produces. Ratings file

One need not worry about jumbled and messy file names like 'Cinema.Paradiso.1988.1080p.BluRay.x264.anoXmos.mp4', the script takes care of the same.

Requirements and Installation

The Python script uses Beautiful Soup python module. To install it, use

$pip install bs4

Usage

The path to the directory containing your movies is passed as a command line argument, along with the option on sorting into ascending or descending order, as shown:

$python3 imdbfinder.py enter_complete_path_to_directory_here order_of_the_list('a'/'A' for Ascending and 'd'/'D' for Descending)

Example

$python3 imdbfinder.py /home/sankalp/Movies a

NOTE Ensure that you are using Python 3 and not Python 2. There may be Unicode-related errors in Python 2.

Acknowledgements and Future improvements

A big thanks to Apurv Bajaj for writing the sort function and to Shyamal Vaderia for inputs and awesome suggestions! Suggestions for improvement are welcome!

About

A Python script that reads movie names from a file and creates a file having IMDb ratings for each movie.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages