Giter VIP home page Giter VIP logo

recommend-a-movie's Introduction

Recommend a Movie

a basic movie recommendation tool based off of my ratings on letterboxd.com

Instructions

You can either visit the page here https://hal-9.github.io/recommend-a-movie/ or clone/download a local version to your computer to run it by opening the index.html file in your browser.

Features

  • the user can select a genre in the header of the page
  • upon selection, the page displays a grid of all movie posters matching the genre
  • the movies are sorted by highest ratings to lowest, in the favorite category are only movies that have the highest rating
  • all movie posters are external links to the letterboxd page of the movie

Code

  • as the letterboxd page has no open api to work with, i exported my ratings into a .csv file and then converted into json to make use of the data

  • i had to write a script (and run it through a node.js server) that scrapes the letterboxd page of each movie for a link to the according tmdb page

  • in that link, there was a unique ID for the movie, which i then extracted

  • with that id i was then able make fetch requests to the tmdb api, to get a poster path and genres for each movie

  • finally i took that new information and added it into each movie object in my json data file

  • with that file i can now dynamically create a grid of movies based on user input and sorted by rating

  • to make the script work i had to utilize fetch requests and work with promise chains, moreover i had to use a rate limiter to make requests according to the tmdb api

  • in order to create the page layout i used css grid and filled an empty div dynamically with js by manipulating the dom.

License

recommend-a-movie's People

Contributors

hal-9 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.