A simple Rails shows parser that checks if the shows in the homepage are showing repeated content to the user.
Although I only just started using Rails, I wanted to challenge myself with this assignment.
- Determine the pattern in the CSS of the different sections in the homepage
- Use Nokogiri Parser to parse the content and get the unique links
- Use a hash table to determine if there is any repeats in shows
- Because I can trigger an API call anytime I want
- I can set up a cron job to check for duplicates on a periodic basis
- Clone the repo
bundle install
- Run "rails server"
- Go to localhost:3000
- It auto refreshes the page every 10 minutes, making it an awesome dashboard for the team populating the content on the homepage.
Alternatively, to access an api endpoint you can go to localhost:3000/api
Unable to parse sections Top picks for you, recommended clips and newly added episodes because I am unable to get its elements from the page source.
- Carousel items
- Trending in Singapore
- Top picks for you
- Recommended clips for you
- Viki Picks
- Fan collections
- Newly added episodes
- Currently on air
- Coming soon
- Ruby 2.2.2 or newer is installed
- Gem is also installed