Welcome to the TechCrunchNews Bot! 💥 This powerful Telegram bot is your gateway to the latest tech news from TechCrunch, delivered directly to your Telegram channel. Built with cutting-edge tools like Pyrogram and MongoDB, this bot ensures you stay ahead of the curve in the fast-paced world of technology. 🌟
- Automated News Updates 💫: Fetches the latest TechCrunch articles every 40 minutes and posts them to your channel.
- Rich Media Posts ✨: Each post includes the article title, a concise summary, an image (when available), and additional details scraped from the article.
- Interactive Buttons 👀: Inline buttons allow users to refresh the news, read the full article, join a tech news channel, or share the post with others.
- Smart Duplicate Prevention ❄️: Uses MongoDB to track posted articles, ensuring no duplicates clutter your feed.
Follow these simple steps to get the bot up and running:
-
Clone the Repository 📂:
git clone https://github.com/abirxdhack/TechCrunchNews.git cd TechCrunchNews -
Install Dependencies 🛠️: Make sure you have Python 3.9 or above installed. Install the required packages using:
pip install -r requirements.txt
-
Configure the Bot ⚙️:
- Copy the
config.pytemplate and create your ownconfig.pyfile. - Fill in the following values:
API_ID: Your Telegram API ID. Get it from my.telegram.org.API_HASH: Your Telegram API Hash. Get it from my.telegram.org.BOT_TOKEN: Your bot's token. Get it by creating a bot via BotFather on Telegram.MONGO_URI: Your MongoDB connection string. Set up a MongoDB database and obtain the URI from your provider (e.g., MongoDB Atlas).DB_NAME: The name of your MongoDB database.COLLECTION_NAME: The name of the collection where posted articles will be stored.CHANNEL_USERNAME: The username of the Telegram channel where the bot will post news (e.g.,@yourchannel).
- Copy the
- Python 3.9 or above 🐍
- Pyrogram ⭐️
- aiohttp
- feedparser
- beautifulsoup4
- pymongo
- psutil
Tip: Use pip install -r requirements.txt to install all dependencies at once! 💡
To run the bot on your local machine:
python main.pyThe bot will start fetching and posting news to your channel every 40 minutes.
To run the bot on a Virtual Private Server (VPS) and keep it running in the background, use screen:
- Install screen (if not already installed):
sudo apt-get install screen
- Start a new screen session:
screen -S techcrunch_bot
- Run the bot inside the screen session:
python main.py
- Detach from the screen session by pressing
Ctrl+Afollowed byD. - Reattach to the screen session later (if needed):
screen -r techcrunch_bot
Pro Tip: Using screen ensures your bot keeps running even after you close the terminal! 🖥️
Love tech news as much as we do? Join the fun! 💥 Feel free to:
- Open an issue to report bugs or suggest enhancements.
- Submit a pull request to improve the code or add new features.
Your contributions help make this bot even better! 🌐
This project is licensed under the MIT License. See the LICENSE file for details.
✨ Stay ahead of the curve with TechCrunchNews Bot! ✨
Clone the repo, set it up, and enjoy a steady stream of tech updates delivered right to your Telegram channel! 👀