🤖 A Telegram bot that retrieve's NASA renowned picture of the day service (APOD) with a single command!
Use it live here: https://t.me/PictureofTheDayBot
A simple and convenient telegram bot that retrieves pictures from NASA's APOD Service after the user enters a simple command: '/picture'. It shows the title of the image, the photo and a simple description of the picture.
The bot uses Telegram's API to communicate with the user to send messages to them. After the user successfully authenticates i.e starts the bot by clicking on the start button on the bot, it is ready to send the current picture of the day.
The user is provided with two GUI options, an on-screen button to easily get the image or an in-line suggestion as the user writes '/picture' in the message box.
Once the bot receives this request, it uses NASA APOD's API to retrieve the data in JSON format. The information is then converted into a message that is sent to the user within 5 seconds using Telegram's API.
The bot utilizes the NLTK python library to convert the giant wall of NASA text into a minimal summary.
The entire bot is written in Python 3.7
To use the bot, type:
/picture
You can either type the entire command - '/picture' or use the GUI interface instead. The bot will then quickly reply the current picture of the day.
Please note: The bot could be slow sometimes as it depends on NASA's API requests.
- Python-Telegram-Bot - Unofficial Python wrapper for Telegram's API
- Amazon AWS EC2 - Amazon AWS's cloud computing service
- NLTK - The Natural Language Toolkit Python library for text summary and language processing
- Requests - Requests library for HTTP Requests
- Logging - Logging library for debugging
- Time / DateTime - Time libraries
- Sumit Agrawal
This project is licensed under the MIT License - see the LICENSE file for more details.
- Thank you to Python-telegram-bot for providing the python wrapper!