0.3.3 • Published 3 years ago

bilibili-notify-telegram-bot v0.3.3

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

bilibili notification telegram bot

A Telegram bilibili-noti forwarding bot base on bilibili's web API.

中文 README

Usage

npm i bilibili-notify-telegram-bot

Deploy with telegram_bot_utils

const bot = BotUtils.bots.get('yourbot') // telegram-bot-utils instance

bilibiliNotif.run(bot, {
        scriptPath: './script/bilibili_script.js',
        hookCliOptions: {
            enable: true,
            user: 'USER-ID',
            address: 'http://hook.server.com',
            port: 8030,
            password: 'password',
        },
        momentLocale: 'zh-cn',
    }
})

How to get Cookie

via web browser

We need to provide a cookie called SESSDATA for using this API. Since this SESSDATA is a HttpOnly cookie, it can't get by running Javascript in browser console, so we need help with other DevTool.

  • Visit bilibili's home page and sign in;
  • Open Network panel in DevTools of browser on the page;
  • Send a request to bilibili's API by url;
  • Find request's name start with dynamic_new in Network panel, check the request detail;
  • Find a string similar to the following which can be found in Cookie of Request or Request Headers, then copy to your clipboard;
    SESSDATA=403b3c2a%bC1601334589%2C9c817*51;
  • Send set cookie command with your SESSDATA info;
    /bilibili_sessdata_update 403b3c2a%bC1601334589%2C9c817*51
  • Wait for bot's response.

via MitM tools

0.3.4-beta.0

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.2-beta.7

3 years ago

0.3.2-beta.6

4 years ago

0.3.2-beta.5

4 years ago

0.3.2-beta.4

4 years ago

0.3.2-beta.3

4 years ago

0.3.2-beta.2

4 years ago

0.3.2-beta.1

4 years ago

0.3.2-rc1

4 years ago

0.3.1-rc5

4 years ago

0.3.1

4 years ago

0.3.1-rc4

4 years ago

0.3.1-rc3

4 years ago

0.3.1-rc2

4 years ago

0.3.1-rc1

4 years ago

0.3.0

4 years ago