Skip to content

body-clock/freddie-bot

Repository files navigation

freddie-bot

A dreddful little twitter bot that grabs a random lyric from any Freddie Dredd song and attaches a random picture of a cat.

How it works:

  1. Downloads a CSV of all Freddie Dredd Songs from s3 and creates a list from that CSV
  2. Picks a random song from that list and grabs the lyrics
  3. Cleans up the data and picks some random lyrics
  4. Gets a cat image from the The Cat API
  5. Downloads that image into memory, uploads the bytes to s3
  6. Downloads the image from the s3 bucket into the running AWS Lambda function
  7. Combines the lyrics and the image in a tweet and posts it using Tweepy

Dependencies

boto3==1.26.32
lyricsgenius==3.0.1
requests==2.28.1
tweepy==4.12.1

For fun. Requires access to my s3 bucket so getting it up and running on your local machine might be tricky. Feel free to clone/fork and mess around with it.

Releases

No releases published

Packages

No packages published

Languages