Skip to content

Building a simple Telegram Python Bot that calls a public News API

Notifications You must be signed in to change notification settings

bvanaken/Bot_Workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Bot from "Build your own bot"-Workshop

Build a simple Python Telegram Bot that displays top news headlines.

We use the python-telegram-bot wrapper and the NewsAPI.org Python client.

Getting Started

  1. Create a new bot with Telegram's BotFather (https://t.me/BotFather)

  2. Insert the bot's token in bot.py.

  3. Register at https://newsapi.org to get your personalized token.

  4. Insert NewsAPI token in news_api.py.

  5. Set up virtual environment and activate it:

virtualenv -p python3.7 env
. env/bin/activate
  1. Install dependencies: pip install python-telegram-bot newsapi-python

  2. Run Chatbot: python bot.py

Have fun with your bot!

About

Building a simple Telegram Python Bot that calls a public News API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages