项目作者: xxgicoxx

项目描述 :
Serverless Telegram bot for searching subtitles from OpenSubtitles.
高级语言: JavaScript
项目地址: git://github.com/xxgicoxx/opensubtitles-bot.git
创建时间: 2021-03-18T20:53:18Z
项目社区:https://github.com/xxgicoxx/opensubtitles-bot

开源协议:MIT License

下载


OpenSubtitles Bot

Serverless Telegram bot for searching subtitles from OpenSubtitles.



Features

  • /search name, filename or imdbid - Search subtitles
  • /help - Help
  • /upload - Link to upload subtitles
  • /about - About

Prerequisites

Running

1. Telegram

  1. # Create an Telegram bot
  2. Find @BotFather on Telegram, type /newbot and follow the instructions.
  3. # Credentials
  4. Save your token from @BotFather.

2. OpenSubtitles

  1. # Create an OpenSubtitles account
  2. Create an OpenSubtitles account on https://opensubtitles.com/.
  3. # API Key
  4. Create an API key on https://www.opensubtitles.com/consumers.
  5. # Credentials
  6. Save your credentials from OpenSubtitles.

3. Vercel Deploy

  1. # Account
  2. Create an Vercel account on https://vercel.com/.
  3. # Install Vercel CLI
  4. npm install -g vercel
  5. # Vercel CLI login
  6. vercel login
  7. # Deploy
  8. vercel
  9. # Set Vercel environment variables
  10. TELEGRAM_USERNAME
  11. TELEGRAM_TOKEN
  12. OPENSUBTITLES_USERAGENT
  13. OPENSUBTITLES_USERNAME
  14. OPENSUBTITLES_PASSWORD

4. Setting up the Telegram webhook

  1. curl --location --request POST https://api.telegram.org/bot<YOUR-TELEGRAM-TOKEN>/setWebhook --header 'Content-type: application/json' --data '{"url": "https://project-name.username.vercel.app/api/webhook"}'

Built With

Authors

Acknowledgments