All Projects → sparanoid → a-soul

sparanoid / a-soul

Licence: AGPL-3.0 license
Full-featured social media monitor that extracts data from a variety of services and pushes updates to Telegram or other platforms

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to a-soul

Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+46338.46%)
Mutual labels:  rss, bilibili, weibo, douyin
Bilibili Api Collect
哔哩哔哩-API收集整理【不断更新中....】
Stars: ✭ 4,497 (+11430.77%)
Mutual labels:  bilibili, bilibili-live, bilibili-api
Bililive dm VR
[咕咕咕中] B站VR弹幕姬
Stars: ✭ 18 (-53.85%)
Mutual labels:  bilibili, bilibili-live
YHThirdManager
一个快速、简单、易集成、扩展性好的社交化组件。摒弃友盟等三方库,使用原生SDK。支持微信支付、微信分享、微信登录、微信授权、QQ授权、QQ分享、QQ登录、新浪授权、新浪登录、新浪分享、微博评论、微博获取、支付宝支付。极大的减小了包体积;同时加入了自动管理提示框的功能
Stars: ✭ 41 (+5.13%)
Mutual labels:  weibo, qq
union
union login for wechat,weibo,qq,alipay with go
Stars: ✭ 23 (-41.03%)
Mutual labels:  weibo, qq
rss
RSS订阅插件 for Hoshinobot
Stars: ✭ 28 (-28.21%)
Mutual labels:  rss, rsshub
userscript
My Userscripts
Stars: ✭ 30 (-23.08%)
Mutual labels:  bilibili, a-soul
douyin2youtube
Download hot video from douyin and upload the video to Youtube automatic.
Stars: ✭ 28 (-28.21%)
Mutual labels:  douyin, tiktok
ByteDanceOpen
Bytedance(TikTok, Toutiao)third party open platform backend SDK, provides easy-to-use authorization, template management, code package management and other APIs.字节跳动(抖音, 头条)第三方开放平台小程序sdk, 提供了简单易用的授权,模版管理,代码包管理等api.
Stars: ✭ 67 (+71.79%)
Mutual labels:  douyin, tiktok
douyin-go
抖音SDK
Stars: ✭ 73 (+87.18%)
Mutual labels:  douyin, tiktok
bilibiliAPI
bilibiliAPI
Stars: ✭ 42 (+7.69%)
Mutual labels:  bilibili, bilibili-api
BilibiliTool
Bilibili直播站小工具
Stars: ✭ 26 (-33.33%)
Mutual labels:  bilibili, bilibili-live
TikTokDownloader PyWebIO
🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音|TikTok数据爬取工具,支持API调用,在线批量解析及下载。
Stars: ✭ 919 (+2256.41%)
Mutual labels:  douyin, tiktok
Shiro
基于OneBot协议的QQ机器人快速开发框架
Stars: ✭ 78 (+100%)
Mutual labels:  qq, go-cqhttp
lux
👾 Fast and simple video download library and CLI tool written in Go
Stars: ✭ 19,266 (+49300%)
Mutual labels:  bilibili, qq
picgo-plugin-bilibili
为 PicGo 开发的一款插件,新增了B站图床 图床。 使用用户动态的图片上传API。填写SESSDATA即可,获取方式在下面。
Stars: ✭ 43 (+10.26%)
Mutual labels:  bilibili, bilibili-api
proxy rsshub
使用 GitHub Actions 反代 RSSHub + 多实例轮询
Stars: ✭ 41 (+5.13%)
Mutual labels:  rss, rsshub
OAuthLogin.AspNetCore
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 43 (+10.26%)
Mutual labels:  weibo, qq
BilibiliMangaAutoClockIn
Bilibili 漫画自动签到
Stars: ✭ 21 (-46.15%)
Mutual labels:  bilibili, bilibili-api
BilibiliLiveRecordDownLoader
Bilibili 直播录制与回放下载
Stars: ✭ 422 (+982.05%)
Mutual labels:  bilibili, bilibili-live

A-SOUL

Full-featured social media monitor that extracts data from a variety of services and pushes updates to Telegram or other platforms

Features

  • Monitor several services at the same time
  • Support retry on failed connections
  • Proxy support to avoid API rate limit
  • Low memory footprint (About 50 MB for a single account, 120 MB for 20 accounts with multiple services)
  • ESM by default with minimal dependencies

Supported Services (and plans)

  • bilibili
  • bilibili-live
  • douyin
  • douyin-live
  • instagram
  • tiktok
  • tiktok-live
  • twitter (via rss)
  • weibo
  • youtube (via rss)
  • youtube-live
  • rss (rsshub and rsshub-json)
  • github (via rss)
  • ddstats
  • tapechat
  • afdian

Supported Senders

  • telegram
  • go-cqhttp (QQ Guilds/Groups)

System Requirements

  • Node.js >= 16

Usage

Run with npx:

# Show general help
npx @a-soul/core -h

# Start from specific config file
npx @a-soul/core run -c config.js

Run with Docker:

docker run --init \
  -v $(pwd)/config.js:/app/config.js:ro \
  -v $(pwd)/db:/app/db \
  sparanoid/a-soul -c config.js --color
  # ...or use ghcr.io registry
  ghcr.io/sparanoid/a-soul -c config.js --color

Configurations

Minimal config.js:

export default {
  accounts: [
    {
      enabled: true,
      slug: '嘉然',
      biliId: '672328094',
    },
  ]
}

Your full config.js configuration may look like:

export default {
  // Loop interval in milliseconds
  loopInterval: 60 * 1000,

  // A small amount of time to wait inserted before each account
  loopPauseTimeBase: 1000,

  // Math.random() time factor for `loopPauseTimeBase`
  loopPauseTimeRandomFactor: 2000,

  // 24 hours, if latest post older than this value, do not send notifications
  douyinBotThrottle: 36 * 3600 * 1000,
  douyinLiveBotThrottle: 1200 * 1000, // 20 mins

  // 65 mins, bilibili sometimes got limit rate for 60 mins.
  bilibiliBotThrottle: 65 * 60 * 1000,
  bilibiliLiveBotThrottle: 65 * 60 * 1000,
  bilibiliFollowingBotThrottle: 3600 * 1000,

  rssBotThrottle: 12 * 3600 * 1000,
  weiboBotThrottle: 3600 * 1000,
  ddstatsBotThrottle: 3600 * 1000,
  tapechatBotThrottle: 3600 * 1000,
  afdianBotThrottle: 3600 * 1000,

  // Custom proxy to bypass bilibili API rate limit
  // Default: ''
  rateLimitProxy: 'http://10.2.1.2:7890',

  // Options for got
  // Default:
  // {
  //   requestOptions: {
  //     timeout: {
  //       request: 4000
  //     }
  //   }
  // }
  pluginOptions: {
    requestOptions: {
      timeout: {
        request: 3000
      },
    },
    customCookies: {
      // Nov 11, 2021
      // Douyin main site now requires `__ac_nonce` and `__ac_signature` to work
      douyin: `__ac_nonce=XXX; __ac_signature=XXX;`,

      // get `SESSDATA` cookie from https://www.bilibili.com/
      bilibili: `SESSDATA=XXX`,

      // get `SUB` cookie from https://m.weibo.cn/
      weibo: `SUB=XXX`,
    }
  },
  telegram: {
    enabled: true,
    apiBase: 'https://api.telegram.org/bot',
    token: ''
  },
  qGuild: {
    enabled: true,
    // go-cqhttp endpoint
    // See https://github.com/Mrs4s/go-cqhttp to learn how to deploy qo-cqhttp
    // and send updates to QQ Guild
    apiBase: 'http://10.2.1.2:5700',
  },
  sentry: {
    enabled: true,
    dsn: `https://[email protected]/9`,
    environment: `production`,
    tracesSampleRate: 1.0,
  },
  accounts: [
    {
      // Use `false` to disable checking this profile
      // Default: true
      enabled: true,

      // Slug is used to identify accounts in logs
      slug: '嘉然',

      // Set to `true` to add `slug` at the beginning of the notification.
      // ie: #嘉然. Useful for pushing notifications with multiple accounts in
      // one channel
      // Default: false
      showSlug: true,

      // bilibili account UID
      biliId: '672328094',

      // Check bilibili activity comments. Disabled by default
      // This fires another API to monitor comments and replies. It's not
      // recommended to enable this feature if you have a lot of accounts to
      // monitor or you will soon hit API rate limit.
      // Default: false
      bilibiliFetchComments: true,

      // How many page to fetch for comments. Should be >= 0.
      // 0 means fetch only 1 (index 0) page
      // Default: 5
      bilibiliFetchCommentsLimit: 5,

      // In addition to `bilibiliFetchComments`, this disables fetching replies
      // in each comments.
      // Default: false
      bilibiliFetchCommentsDisableReplies: true,

      // Check bilibili account following. Disabled by default
      // This fires another API to monitor account following. It's not
      // recommended to enable this feature if you have a lot of accounts to
      // monitor or you will soon hit API rate limit.
      // Default: false
      bilibiliFetchFollowing: true,

      // Enable this to fetch users with private following enabled
      // Default: false
      bilibiliFetchFollowingDeprecatedApi: true,

      // Douyin account ID
      douyinId: 'MS4wLjABAAAA5ZrIrbgva_HMeHuNn64goOD2XYnk4ItSypgRHlbSh1c',

      // Douyin live ID is separated and need to be calculated from `douyinId`
      douyinLiveId: '',

      // Weibo account ID
      weiboId: '7595006312',

      // Check Weibo activity comments. Disabled by default
      // This fires another API to monitor comments and replies. It's not
      // recommended to enable this feature if you have a lot of accounts to
      // monitor or you will soon hit API rate limit.
      // Default: false
      weiboFetchComments: true,

      // RSS services. One account can have more than one RSS service. They will
      // be executed one by one in the loop.
      rss: [
        {
          // Name will be used as tag in notification output
          name: 'Twitter',

          // Slug stored in database. Must be unique for current account (Can
          // not be `bilibili`, `weibo`, or other predefined services)
          slug: 'rss_twitter',
          type: 'twitter',

          // Language tag used by timestamp
          lang: 'ja',

          // Can be `rsshub-json` or `rsshub`
          // See https://github.com/sparanoid/rsshub-json for more info
          provider: 'rsshub-json',
          url: 'http://rsshub-json-instance/twitter/user/minatoaqua/showAuthorInDesc=1&showEmojiForRetweetAndReply=1&showRetweetTextInTitle=0&showQuotedInTitle=1&heightOfPics=150',
        },
        {
          name: 'YouTube動画',
          slug: 'rss_youtube',
          type: 'youtube',
          lang: 'ja',
          provider: 'rsshub',
          url: 'https://rsshub.app/youtube/channel/UC1opHUrw8rvnsadT-iGp7Cg',
        },
      ],

      // Tape message box account ID. Usually the last part of your message
      // box's URL. ie. https://www.tapechat.net/uu/TDL6BG/EVWKIS0F the
      // `tapechatId` should be `EVWKIS0F`
      tapechatId: 'RQOPYMJQ',

      // Aifadian (afdian) user ID
      afdianId: 'beaf1482bc2511ea896452540025c377',

      // Telegram chat/channel ID to receive notifications
      tgChannelId: 41205411,

      // QQ guild ID to receive notifications
      qGuildId: '12345678901234567',

      // QQ guild channel ID to receive notifications, `qGuildId` is also
      // required to identify which channel to be sent
      qGuildChannelId: 1234567,

      // Update Telegram chat/channel photo/avatar when user avatar updates in
      // included sources.
      // Default: []
      tgChannelAvatarSource: ['weibo', 'bilibili'],

      // Show custom color output in console. Nothing useful
      // Default: '#fff'
      color: '#e799b0',

      // Avoid chekcing bilibili live stream. Some accounts may not have live
      // stream ability
      // Default: false
      disableBilibiliLive: false,

      // Avoid checking douyin live stream
      // Default: false
      disableDouyinLive: false,

      // Disable checking DDStats. Some bilibili accounts may not have DDStats
      // feature enabled
      // Default: false
      disableDdstats: false,
    },
    {
      enabled: true,
      slug: '贝拉',
      showSlug: true,
      biliId: '672353429',
      douyinId: 'MS4wLjABAAAAlpnJ0bXVDV6BNgbHUYVWnnIagRqeeZyNyXB84JXTqAS5tgGjAtw0ZZkv0KSHYyhP',
      douyinLiveId: '820648166099',
      weiboId: '7594710405',
      tgChannelId: '41205411',
      color: '#bd7d74',
    },
  ]
}

Development

You need to have Yarn installed first:

# Install dependencies
yarn install

# Create config file
vi config.js

# Execute locally
yarn run start --once --verbose

FAQ

Why this name?

The original intention of this project was to monitor updates of a Chinese VTuber group A-SOUL.

Why not executing checks in parallel?

Most services have API limits or rate limits. Executing checks in parallel only make sense with small amount of accounts.

License

AGPL-3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].