Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Study] Python telegram bot + Flask #13

Closed
chen-tf opened this issue Dec 4, 2022 · 5 comments
Closed

[Study] Python telegram bot + Flask #13

chen-tf opened this issue Dec 4, 2022 · 5 comments
Assignees

Comments

@chen-tf
Copy link
Owner

chen-tf commented Dec 4, 2022

身為 要出錢去平台開機器的苦主
我希望 notifier_web.pypt_bot.py 都能使用 Flask 來接收 http request
如此 我就不用開兩台機器分別執行他們

Definition of Done

application 可以同時接受 LINE notify & Telegram Bot Webhook

@chil2020 chil2020 self-assigned this Dec 5, 2022
@chil2020
Copy link

chil2020 commented Dec 5, 2022

這不能起不同的port 放在同一台機器嗎? 哈哈 , line notify之前有玩過, 這我可以去研究看看

@chen-tf
Copy link
Owner Author

chen-tf commented Dec 5, 2022

fly.io 對外暴露的只有 80, 443 port,這樣內部 service 就算可以起在不同 port,但出去的洞口也只有一個,不確定是不是我有漏看什麼

@hokou
Copy link
Contributor

hokou commented Dec 5, 2022

原來有 2 組,我一開始還從檔案裡找 app.py 找不到

還是說可以用自訂的 API (網址/api)增加?
這樣就可以共用 port

@chil2020
Copy link

chil2020 commented Dec 5, 2022

fly.io好像可以用Nginx , 要再去看看了

@chen-tf
Copy link
Owner Author

chen-tf commented Dec 8, 2022

https://github.com/sjfbo/video-to-gif-telegram-bot/blob/master/app.py
今天先跟 @ken71301 討論後,會先把 TelegramBot 的寫法改成像是上面這個 example 的樣子,和 Flask 整在一起。

@chen-tf chen-tf closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants