0.1.1 • Published 6 years ago

youtube-channel-video-fetcher v0.1.1

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

Youtube Channel Video Fetcher

This module allows you to retrieve all video informations from a channel without using official Youtube API.

Install

npm install --save youtube-channel-video-fetcher

Table of contents

Cheat Sheet

const YoutubeChannel = require('youtube-channel-video-fetcher');

Fetch videos

const YoutubeChannel = new YoutubeChannel('channelId');
const scrapeChannel = (continuation) => {
    return new Promise((resolve, reject) => {
        YoutubeChannel.getVideo(continuation).then(function(videos) {
            if(videos.continuation !== 0) {
                resolve(scrapeChannel(videos.continuation));
            }
            console.log(posts);
        });
    });
};
scrapeChannel();

More examples in async/await

To see more examples, click here

Configuration

ParamTypeDefaultDescription
channelIdStringEmptyChannel id or username

License

The MIT License (MIT)

Copyright (c) 2018 Kakulukian