npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vivid-radar

v1.1.1

Published

**Vivid Radar** is a powerful tool written in TypeScript, designed to fetch and parse feed & media from various platforms in real-time, compatible with ```vivid``` system.

Downloads

67

Readme

vivid-radar

Vivid Radar is a powerful tool written in TypeScript, designed to fetch and parse feed & media from various platforms in real-time, compatible with vivid system.

Supported platforms

This project is designed to retrieve short-term data, with the maximum number of items varying across different platforms. | Platform | Max Items | Contents | Image | Video | Thumbnail |--|--|--|--|--|--| | Twitter(X) | 50 | ✅ | ✅ | ✅ | ✅ | | TikTok | Infinity | ✅ | - | ❌ | ✅ | | Daum Cafe | 20 | ✅ | ✅ | ❌ | ❌ | | Bstage | Infinity | ✅ | ✅ | ✅ | ✅ |

Usage

Twitter(X)

Config | key | description | |--|--| | userId | Target user id | | userName | Target user name | | authToken | Twitter auth token (cookie) | | userAgent | User agent (optional) | | bearerToken | Request bearer token (optional) | | queryId | Graphql Query Id (optional) |

Example

import { TwitterClient } from 'vivid-radar';
const twitter = new TwitterClient({  
  userId: '1534717807518429186',  
  userName: 'CSR_offcl',  
  authToken: process.env.TWITTER_AUTH_TOKEN as string, // hex (length=40)
});
const feeds = await twitter.scrap();

TikTok

Config
| key | description |
|--|--|
| id | Target user id |
| tokenConfig | TikTok msToken config |
| maxCount | Approximate feed count (optional) |
| userAgent | User agent (optional) |
| browserVersion | TikTok client browser version (optional) |
| deviceId | TikTok client device id (optional) |

Example

import { TiktokClient } from 'vivid-radar';
const tokenConfig = {
  url: process.env.TIKTOK_TOKEN_URL as string, // e.g. https://mssdk-sg.tiktok.com/...
  magic: parseInt(process.env.TIKTOK_TOKEN_MAGIC as string), // e.g. 512965148
  version: 1,
  dataType: 8,
  strData: process.env.TIKTOK_TOKEN_STR_DATA as string, // e.g. fWOdJTER3/jwmZqSBs...
};
const tiktok = new TiktokClient({
  id: 'csr.offcl',
  tokenConfig,
});
const feeds = await tiktok.scrap();

Daum Cafe

Config | key | description | |--|--| | cafeId | Daum Cafe url id | | boardId | Daum Cafe target board id | | grpId | Daum Cafe group id |

Example

import { DaumClient } from 'vivid-radar';
const daum = new DaumClient({
  cafeId: 'csr.official',
  boardId: 'ZDmo',
  grpId: '1ZKSg' // Can retrive from board iframe url
});
const feeds = await daum.scrap();

Bstage

Config | key | description | |--|--| | id | Bstage profile id | | host | Bstage host | | page | Feed page (Default: 1) | | pageSize | Feed page size (Default: 20) |

Example

import { BstageClient } from 'vivid-radar';
const bstage = new BstageClient({
  id: 'csr',
  host: 'csr.bstage.in',
});
const feeds = await bstage.scrap();

Response

[
  {
    type: 'twitter',
    id: '1814944229346484598',
    account: 'CSR_offcl',
    title: '너 좀 나 닮았다?\n\n#첫사랑 #CSR #금희 #GEUMHEE',
    members: [],
    date: Date('2024-07-21T08:43:18.000Z'),
    media: [
      {
        type: 'image',
        url: 'https://pbs.twimg.com/media/GS_6JwAbQAAQBOG.jpg',
      },
      {
        type: 'image',
        url: 'https://pbs.twimg.com/media/GS_6Jv8bIAEWoAv.jpg',
      },
    ],
  },
  {
    type: 'bstage',
    id: '880074',
    account: 'csr.bstage.in',
    title: 'ねこしひょん😽',
    members: [],
    date: Date('2024-07-04T05:10:42.183Z'),
    media: [
      {
        type: 'video',
        thumbnail: 'https://image.static.bstage.in/cdn-cgi/image...',
        url: "https://media.static.bstage.in/csr/media/66862ea..."
      },
    ],
  },
  ...
]