Git Product home page Git Product logo

twideo's Introduction

Twideo: Simple Telegram Bot for downloading videos from Twitter

Setting up your environment

  1. Download Rust.
  2. Create a new bot using @Botfather to get a token in the format 123456789:blablabla.
  3. Get an twitter access token.
  4. Optional Step: Install PostgreSQL database
  5. Install redis(for caching threads)
  6. initialize the TWITTER_BEARER_TOKEN, TWITTER_BEARER_TOKEN2(to handle too many requests per second), TELOXIDE_TOKEN and DATABASE_URL(optional) environmental variables:
# Unix-like
$ export TELOXIDE_TOKEN=<Your token here>
$ export TWITTER_BEARER_TOKEN=<Your bearer token here>
$ export TWITTER_BEARER_TOKEN2=<Your 2nd bearer token or just leave it blank>
$ export DATABASE_URL=<Your database url or ignore it>
$ export REDIS_URL=<Your redis url>

# Windows
$ set TELOXIDE_TOKEN=<Your token here>
$ set TWITTER_BEARER_TOKEN=<Your bearer token here>
$ set TWITTER_BEARER_TOKEN2=<Your 2nd bearer token or just leave it blank>
$ set DATABASE_URL=<Your database url or ignore it>
$ set REDIS_URL=<Your redis url>

You can rename `.env-template` file to `.env` and put your environmental variables there.
  1. Run cargo run and enjoy the life :)

Getting Started

Just copy the link of the tweet and send it to the bot, It will convert tweet to telegram message:

example

This bot also supports Inline mode:

inline-example

twideo's People

Contributors

0xnima avatar nee-maa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.