1.1.2 • Published 1 year ago

youtube-scraper-data v1.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

How to Run Scrape-YouTube

1. Install Dependencies

First, run the following command in your terminal to install all the necessary dependencies:

npm install

Wait until the installation is complete.

2. Start the Application

Once the installation is finished, start the application with:

npm start

............

If you use as package

......

YouTube Data Scraper

A simple Node.js package that uses Puppeteer to scrape PO Token and visitor data from YouTube video embeds without opening a browser window.

Features

  • Extracts PO Token and visitor data from YouTube embed URLs.
  • Runs in headless mode, making it efficient for server-side usage.
  • Easy to integrate into existing Node.js projects.

Installation

Install the package using npm:

npm install youtube-scraper-data

Usage

Import the package and use the scrapeYouTubeData function to scrape data from a YouTube embed URL.

import { scrapeYouTubeData } from "youtube-scraper-data";

scrapeYouTubeData("jNQXAC9IVRw");

Output

The function will log the extracted PO Token and visitor data to the console:

PO_TOKEN: <PO_TOKEN_HERE>
VISITOR_DATA: <VISITOR_DATA_HERE>

API

scrapeYouTubeData(videoId)

videoId: string - The URL of the YouTube embed from which you want to scrape data. This function launches a headless browser, navigates to the specified YouTube embed URL, and logs the PO Token and visitor data to the console.

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago