javierarce / omg_movies

A Twitter bot that loves films big time but doesn't have a very good memory :(

Home Page:https://twitter.com/omg_movies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OMG Movies!

A Twitter bot that loves films big time but doesn't have a very good memory :(

Watch it in action here: https://twitter.com/omg_movies

How does it work

The data folder of the bot contains a list of Internet Movie Database movie ids. When a new tweet is requested, a random id is picked and used to obtain a hash with all the movie metadata using OMDB.

The bot then picks a word from the movie title and tries to find a word that rhymes or belongs to the same semantic context using the Wordnick API. If a rhyme is found, it's then used to replaced the original word in the title. The bot applies the same kind of substitution with the last name of the main actor/actress.

Finally, the bot picks a random template from movie_templates, replaces the special tokens (TITLE, ACTOR, GENRE, DIRECTOR), and publishes the tweet.

How to install it

  1. Remix the project on Glitch
  2. Edit the key.env file with:
  • A random SECRET string to update the bot and publish a new tweet.
  • A wordnick API key.
  • An OMDB API key.
  • Your Twitter app credentials.

Once that is ready visit YOUR_GLITCH_URL.com/SECRET to generate and publish a new Tweet.

Bonus points: use cron-job.org to ping the secret URL every X minutes.

remix button

About

A Twitter bot that loves films big time but doesn't have a very good memory :(

https://twitter.com/omg_movies


Languages

Language:JavaScript 80.6%Language:HTML 15.8%Language:CSS 3.6%