in Code, Python, Twitter, youtube

Building a YouTube-Twitter Bot, Part 0: The Idea

One of my passions in life is finding and consuming great Kenyan content: text, video, audio; doesn’t matter much to me. In a bid to keep abreast with this content, I subscribe to all the Kenyan content I can find on YouTube. However, keeping up with all of this has been difficult.

A combination of algorithmic feeds and an overwhelming amount of content means that I miss out on a lot content. I only have so many hours in a day and I have a full time job.

To that end, I’ve been thinking of making a bot that can ensure that at least I can have a preview of each video and a link to watch the full video if I want to see more. Of course the best place to do this is on Twitter but I’m thinking of also having a daily or weekly newsletter with links to all the new music out that week.

So in this part 0 I’m outlining everything I need to do to get to something that works.

  1. Get list of my subscriptions from YouTube.
  2. Mark channels as music or blog.
  3. For each channel list of recent videos and store that in a database.
  4. Take the last video link and download the video.
  5. Clip the video and clip it to 40s.
  6. Tweet that video (title, link to Youtube)
  7. Save link to tweet, video in database
  8. Check every 30 minutes if there’s a new video, if yes start from 4.

I’m planning to build all of this in python and because I’m terrible at writing tests I’m going to use this exercise to get better at that.

I’m not sure how long all of this will take. I’ve written parts of a program like this before but I’ve never completed it. I’m hoping that by posting about it publicly I can use the pressure to keep me going. Going to try for one post a week about all of this. Peace!!!

Let me know what you're thinking

Comment

15 + two =