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

ytscr

v1.0.5

Published

YTSCR (YouTube Scraper) is a versatile tool designed for efficiently scraping YouTube channels' videos, streams, shorts, and video information.

Downloads

36

Readme

YTSCR

YTSCR (YouTube Scraper) is a versatile tool designed for efficiently scraping YouTube channels' videos, streams, shorts, and video information.

Features

  • Efficiency: YTSCR offers rapid scraping capabilities, facilitating quick retrieval of desired data.
  • User-Friendly: With its intuitive interface, YTSCR is accessible to both novice and experienced users alike.
  • Minimal Dependencies: YTSCR is built with minimal dependencies, ensuring a streamlined experience for integration into various projects.

Usage

Below is a straightforward example demonstrating how to utilize YTSCR to retrieve videos from a YouTube channel using TypeScript:

import { getVideos } from 'ytscr';

async function main() {
  console.log(await getVideos('@MrBeast'));
}

main();

While YTSCR primarily supports ESM/ModernJS, it can also be used with JavaScript. However, please note that JavaScript usage is limited to environments supporting ESM/ModernJS.

import { getVideos } from 'ytscr';

async function main() {
  console.log(await getVideos('@MrBeast'));
}

main();

API Reference

  • getVideos(channelId: string) => Promise<Video[] | { message: string }>

    • Retrieves an array of videos from a specific channel. Returns a message object if there was any error.
  • getStreams(channelId: string) => Promise<Stream[] | { message: string }>

    • Retrieves an array of live streams from a specific channel. Returns a message object if there was any error.
  • getShorts(channelId: string) => Promise<Short[] | { message: string }>

    • Retrieves an array of short videos from a specific channel. Returns a message object if there was any error.
  • getAll(channelId: string) => Promise<AllResponse>

    • Retrieves three different arrays of videos, streams, and shorts from a specific channel. Returns an empty array for each if there was any error.
  • getInfo(videoId: string) => Promise<Info | {message: string}>

    • Retrieves an object containing information of the provided video id. Returns a message object if there was any error.

Contribution

Contributions to YTSCR are welcome and encouraged! If you'd like to contribute to the project, please follow these guidelines:

  1. Fork the YTSCR repository on GitHub.
  2. Make your changes in a feature branch.
  3. Ensure that your code adheres to the project's coding style and guidelines.
  4. Write clear, concise commit messages.
  5. Submit a pull request detailing your changes, along with a brief description of the modifications.

Thank you for considering contributing to YTSCR! Your help is greatly appreciated.

Note for Contributors

Please note that this project was initialized in Bun. Make sure you have Bun installed in your machine so you can contribute without any runtime errors.