GitHub - srsuper/Line_Bot_UI: Line_Bot, an auto-reply bot in Line app, include functions as randomly picture reply, weather forecast, IG and FB video crawler and so on.

Line_Bot_IU

Line_Bot_IU, an auto-reply bot in Line app, include functions as below:
User(text) -> Line server(text) -> Line Webhook(text) -> Your server(text) -> Internal process(output) -> Line server(output) -> User(output)

  1. Reply randomly picture with key word capturing.
  2. Crawing and displaying IG, FB, Ptt, Youtube and DouYin(Tik tok).
  3. Weather forecast with loctation.
  4. Multiple language translator with pronunciation or spelling.

User :

Text reply, Image reply, Flex reply

Capture IG picture, multiplo-pics, video

Capture Facebook, DouYin(Tik tok), Youtube

Google translator : text to text, text to voice

Backstage : Python + Flask + Serveo(or Ngrok)

With: line-bot-sdk-python, flask, googletrans, gtts, Weather api.

Flask: make a internal app server

use "@app.route("/callback", methods=['POST'])" redirecting to "https://127.0.0.1:5000/callback".
use "@handler.add(MessageEvent, message=TextMessage)" handling the message from line server.
use "app.run(port=5000)" to run this app.py as a server.

Serveo: redirect an url to your internal server

in cmd "ssh -o ServerAliveInterval=60 -R YourDomain:80:127.0.0.1:5000 serveo.net"
It will connect your port 5000 to the world with a specific https url(depend on your domain, and maybe your domain alreay be occupied)
Upside: A static https url. No installation or application. Downside: ssh will automatically disconnect due to safety issue. To slove this problem, you can use "Autossh" but somehow it is friendly to Linux not Windows, so I make a ssh checker with python to frequently check ssh connection.

Ngrok: redirect an url to your internal server

in cmd "ngrok http 5000 -host-header="127.0.0.1:5000" -region ap" It will connect your port 5000 to the world with a randomly https url(paid user can customize your own domain) Upside: Faster and more stable. Downside: randomly url(every time you restart the server it will change), need download the program and apply for the registration.