Python Telegram Bot Tutorial: How to create Telegram Bot with Webhook #3 | Python project

preview_player
Показать описание
In this part #3 of Python Telegram bot tutorial I'll show you how to create Telegram bot with Webhook. How to test Telegram Webhook locally (before deploy on a server) with tunnel, How to combine the CoinMarketCap parser (from the previous video) with the Bot.

The Telegram Bot takes a command (cryptocurrency ticker) from a user, such as: /btc, /eth, /xrp, etc., performs a request to the CoinMarketCap API and returns to the user a price of the cryptocurrency in USD.

The Telegram Bot is a Flask framework application that uses a webhook to receive updates.

Follow me @:

============ SOURCE CODE ================
📎️ The SOURCE CODE is available via Patreon:
======================================

✴️✴️✴️ Web Scraping course ✴️✴️✴️
is available via Patreon here:

or its landing:

➥ Please ➥ Like ➥ Comment ➥ Subscribe

--- PLAYLIST ---

Covered topics:

1. Dealing with CoinMarketCap API
2. Making GET and POST requests with the Requests library
3. Dealing with json-objects with Python (reading and writing)
4. Creating a Flask application. Handling POST-requests with a Flask
5. Searching a text with regular expressions
6. Creating a Telegram Bot with BotFather. Adding a bot commands.
7. Dealing with the Telegram bots API.
8. Testing a webhook with tunneling services
9. Deploy Telegram bot (a Flask application) to the PythonAnyWhere servers.
10. Solving a SSL certificates issue with the Flask-SSLify extension

➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Never miss a new video.
Рекомендации по теме
Комментарии
Автор

Восхищен! Никаких ТГ библиотек, все на АПИ и уверенных знаниях. Спасибо, Олег!

inbox
Автор

Олег Молчанов Один из лучших преподавателей по Python!)

Dreamer_
Автор

Thank you for not only showing how to make a bot, but for the explanation what happens exactly. Awesome video!

daschablume
Автор

Watch next - Telegram Bot with Python Tutorial #4: Deploy -

RedEyedCoderClub
Автор

you made me mad by ads during course! but presentation is great . thank you

sk.n
Автор

Nice video man! it's exactly what I was looking for related to configure a Telegram Chatbot with a webhook..

Pilotetravis
Автор

I really like your video.. clear and can be repeated successfully. Thanks a lot

dithopulungan
Автор

Thanks for the tutorial. Question: If you turn off the computer or close python, then the webhook does not work anymore until turned on again?

mauricioocampo
Автор

Hi first of all it’s an amazing tutorial!
My question, all good from part 2 and added a cryptocurrency that is not btc but at this part I would like to have just one command, /price and the bot send ONLY the price as message. What part of the code should i delete/change to do it??
Literally just send the price with command /price.

Thank you very much!!

Ni
Автор

What video should I make next? Any suggestions? *Write me in comments!*
Follow me @:

Help the channel grow! Please Like the video, Comment, SHARE & Subscribe!

RedEyedCoderClub
Автор

Really what I was looking for. Thank you so much 🥰

korigamik
Автор

Hi, very nice tutorial. Please can you tell me how to receive Tradingview view alert to telegram bots then send it to groups? I will really appreciate the help.

awakeningpill
Автор


Also, serveo is down currently. You can download from ngrok from ngrok.com instead. For Windows, you just need to run the exe file after you extract the download from the zip file & then run the command "ngrok.exe http 3000" where you need to replace 3000 with whatever port Flask gives you. Then copy the "forwarding URL" & you can see your localhost is accessible via internet, test on your phone with 4G.

EnglishRain
Автор

Hi Oleg, thanks for video, its very interesting, I've created a bot based on your tutorial which is functional.
But I have two questions:
1) when I enter wrong (non existing) currency after / (by mistake) in telegram message, for example /sergey it will parse it as parameter SERG and send it to CoinMarketCap API, how to handle a lot of HTTP 400 requests in my CoinMarketCap Account activity with parameter SERG. (seems that we should also stop looping this request)
2) When first time bot user will press /start, bot parses this as STAR and gives rate.

SergeyBychenko
Автор

if u got the time, pls make a video about inline mode too, I'm seriously having trouble there🙏

ryannorooz
Автор

Олег, спасибо за Ваши видео!
Вопрос: каким образом можно вернуть Response серверу телеграма, до того, как завершатся вычисления на моём сервере и произойдёт выход из функции index. Просто если этого не сделать, то сервер телеграмма раз в минуту начинает спамить одинаковыми запросами, думая, что мой сервер недоступен.

dmitrysergeevich
Автор

Hello
I found this video very interesting, but I am unable to setup my atom
It is unable to import requests module only, while I have already installed scrpit and ide-python module
Any help here?

arijitsingh
Автор

hey hi, i am receiving a message that says 'webhook already deleted' in the description part and i'm at 11:27 in your video.

abhiavasthi
Автор

Tanks verymuch im need getme 😢IM not found find all content

youtraders
Автор

Thanx XD














(По голосу определил, а потом сморю на ник в хосте и понял что у меня дар XD)

svzmjcg