Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sina-e/twitter2telegram
A simple script to post tweets from Twitter to Telegram
https://github.com/sina-e/twitter2telegram
bot python telegram telegram-bot twitter
Last synced: 3 months ago
JSON representation
A simple script to post tweets from Twitter to Telegram
- Host: GitHub
- URL: https://github.com/sina-e/twitter2telegram
- Owner: sina-e
- License: wtfpl
- Created: 2020-08-24T13:26:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T13:27:57.000Z (about 4 years ago)
- Last Synced: 2024-06-27T12:30:58.230Z (5 months ago)
- Topics: bot, python, telegram, telegram-bot, twitter
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Twitter to Telegram script based on [tweepy](https://github.com/tweepy/tweepy)
## Installation
Make sure *python3* and *git* installed on your system`git clone https://github.com/sinaebrahimi1/twitter2telegram.git`
and just install the requirements: `pip3 install -r requirements.txt`
#### `config.py`
*Twitter configs:*
Put the page ids that you want to be monitored in `follows` as a list like `follows = ["123456", "54321"]`.
_(You can extract user_ids from http://gettwitterid.com.)_Get Twitter API Authentication Credentials from https://developer.twitter.com/ and place them in `Twitter Configs` section:
1. Consumer key
2. Consumer secret
3. Access token
4. Access secret*Telegram configs:*
1. You have to create a channel ant put its id in `TWEET_CH` like the example. (to get channel_id, forward a message from channel to [@userinfobot](https://t.me/userinfobot))
2. Create a new bot with [@BotFather](https://t.me/BotFather) and place it's token in `BOT_API`.
3. Add the bot to the channel and make it channel admin.
## Running the script
`python3 main.py`
if you want to prevent crashes or things like that, just run this command:
`while true; do python3 main.py; done`#### contact me:
* email: [email protected]
* telegram: [@Thunderstrack](https://t.me/Thunderstrack)