I made a *serverless* YouTube Bot in Python!

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • In this video, I explain what serverless computing is, by showing how I've used DigitalOcean Functions, to write a simple RUclips Bot in Python. This Bot is getting the latest published video on a RUclips Channel, and sends out a message to a Discord Channel. We discuss how to use APIs, store and retrieve Secrets, Tokens, use S3 Buckets, and much more. There is a lot of coding stuff in here, hope you'll enjoy it! #serverless #python #digitaloceanfunctions
    DOCS: github.com/ChristianLempa/vid...
    Try DigitalOcean (200$ credits)-*: do.co/thedigitallifetech
    Follow me:
    TWITTER: / christianlempa
    INSTAGRAM: / christianlempa
    TWITCH: / christianlempa
    DISCORD: / discord
    GITHUB: github.com/christianlempa
    PATREON: / christianlempa
    MY EQUIPMENT: kit.co/christianlempa
    Timestamps:
    00:00 - Introduction
    01:43 - What is serverless computing?
    04:09 - Advertisement-*
    05:07 - How to get started with serverless functions?
    09:22 - What is a Cold-Start?
    11:34 - Develop locally with VSCode
    15:40 - Starting my RUclips Bot Project
    20:12 - Fixing some Bugs
    24:09 - Advanced Bot logic
    28:43 - Push a message to Discord
    ________________
    All links with "*" are affiliate links.

Комментарии • 31

  • @warpdotdev
    @warpdotdev Год назад

    Very awesome video, Christian!

  • @uwegenosdude
    @uwegenosdude Год назад +1

    Hi Christian, I found your channel today. This video is really interesting. We also played around with Digital Ocean a couple of years ago. But serverless functions seem to me pretty useful. So thank you very much.

  • @ShahinHemmati2020
    @ShahinHemmati2020 Год назад

    Thank you for such a educational video!
    even more videos like this one is very much appreciated 😊

  • @lucaordronneau1856
    @lucaordronneau1856 5 месяцев назад

    Thank you! Very helpful :)

  • @murtadha96
    @murtadha96 Год назад

    This is REALLY interesting!

  • @DJSolitone
    @DJSolitone Год назад

    Nice tutorial... I may try ChatGPT to generate the code as well... Theme for the next video ? 🤩

  • @domfp133
    @domfp133 Год назад +1

    this is nice, Ey Chris what tool are you using for the diagrams?

    • @J.erem.y
      @J.erem.y Год назад +2

      It's Excalidraw

  • @recursivecube44
    @recursivecube44 Год назад

    To solve the video delete edge case, why don't you just store the last few video IDs in the latest video text file, and then check if the latest video from the RUclips API is in that list of IDs. If the video isn't then you do the discord post, and also add it to the front of the list of video IDs. The only issue with this approach is it requires some separate logic on first execution that would have to get the list of the latest few video IDs.

  • @milanm321
    @milanm321 Год назад

    Great video

  • @vhoover3609
    @vhoover3609 10 месяцев назад

    In cases where an old video my come up as a new one in discord, store the last n ids in the file and compare new I’d against n ids from the file

  • @goosfeel
    @goosfeel Год назад +1

    Which obsidian plugin is that where you showing us the between digital ocean and yt

  • @timestes9455
    @timestes9455 Год назад

    You've mentioned that its bad practice to write secrets and tokens in plaintext in your code. However, in the example, we are putting plaintext environment variables in the project.yaml file.
    If you were using this in production, what solutions would you use to obfuscate the environment variables without committing them to the source code?

    • @mistakek
      @mistakek Год назад

      I think techno tim did a video on this, "Encrypt Your Sensitive Information Before Storing It - Encrypting with Mozilla SOPS and AGE"

    • @christianlempa
      @christianlempa  Год назад +2

      Good point! And yeah you’re right, in the video I had no time to show it. But usually I’m using the environment feature of 1Password for local development. Or when you deploy such a project in a CI CD pipeline it would be good to use GitHub Secrets. Btw… great idea for a future video xD

  • @vijeyparthasarathy
    @vijeyparthasarathy Год назад

    Which is better..
    Truenas or Proxmox.. I have a bare metal server and dont know what to do.. confused with the os.. need guidance

    • @christianlempa
      @christianlempa  Год назад

      Watch my last video about the best Home Server Os :)

    • @vijeyparthasarathy
      @vijeyparthasarathy Год назад

      @@christianlempa
      Hi.. this is not for my home os.. its for my application hosting and got in contabo.. not for home.. sorry for the confussion

  • @t-z-l
    @t-z-l 8 месяцев назад

    Did you reach out to support? What did they tell you?

  • @kimsec
    @kimsec Год назад

    I’ve been trying to write a discord music bot in Python for 3 weeks now, last step now is to Get the bot to play the music, im using lavalink as backend server for music prosessing. My head hurts

  • @LampJustin
    @LampJustin Год назад

    Now you have to self host a serverless platform on Kuberntes yourself with OpenFaaS :P

    • @ShadowManceri
      @ShadowManceri Год назад +1

      "self host a serverless platform" aka hosting a server. I love these meme terms.

    • @LampJustin
      @LampJustin Год назад

      @@ShadowManceri yeah pretty stupid naming...

  • @notmything6629
    @notmything6629 Год назад +3

    Using copilot... welcome to the time of stealing others programmers code...they call it progressive. Haha

    • @J.erem.y
      @J.erem.y Год назад +3

      You will own nothing, and be happy.

  • @MrOnePieceRuffy
    @MrOnePieceRuffy Год назад

    Very nice Video. Very sad that this exactly is the way of doing it for YT, but it's great for such examples with Storage Communications. I can recommened you to do the same stuff with the Twitch API aswell.. You can't make a Video out of it tho, because it's too simple, but from there you can see how a modern Service API should works.
    With Google's pubsubhubbub you can simulate the same WebHook Solution for the YT Api aswell, but the subscribtion isn't infinity.
    The Twitch API Subscription is infinite while the status code is 200.