GithubHelp home page GithubHelp logo

mayjs / twittertelegrambridge Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 4 KB

Allows to send tweets from twitter to telegram using regular expressions to match tweets.

License: MIT License

Python 100.00%

twittertelegrambridge's Introduction

twitterTelegramBridge

Allows to send tweets from twitter to telegram using regular expressions to match tweets.

Installing

This tool is written for Python 3. Just clone this repo and make sure you have installed python-telegram-bot and python-twitter. You can install these by using pip install python-telegram-bot python-twitter.

Now you can copy the file config.py.example to config.py and edit the values as needed. Twitter consumer key and access token and secret must be generated at twitters website.

The Telegram bot token can be created by talking to https://telegram.me/BotFather. Once you start a chat with your telegram bot, you can use showChats.py to list your latest updates with their chat id, which must be inserted into the config aswell.

The TWITTER_TARGET_USER is the twitter account to search, it should start with an @. The TWEET_REGEX can be used to filter tweets, something like "#hashtag" will only allow tweets that contain #hashtag.

ID_SET is the name of a plaintext file used to store the IDs of already seen tweets.

After you configured everything in the config file, you can run the tool with python main.py.

To automate the script, create a cronjob for it, remember to set the working directory in the crontab entry.

twittertelegrambridge's People

Contributors

mayjs avatar

Watchers

James Cloos avatar  avatar  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.