Giter VIP home page Giter VIP logo

cliprxyz's Introduction

cliprxyz

Fetch infos from a Twitch clip with Clipr.xyz website.

GitHub forks GitHub stars GitHub license

Install (with NPM)

npm i cliprxyz

Usage

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res)
}).catch(err => {
    console.log(err);
});

The package will shows:

{
  clipName: 'Shows the clip name',
  clipUrl: 'Shows the clip url',
  creatorUsername: 'Shows the creator username',
  creatorUrl: 'Shows the creator profile url',
  creatorPictureUrl: 'Shows the creator profile picture url',
  creatorWasPlaying: 'Shows what the creator was playing',
  clippedOn: 'Shows the date from when the livestream was clipped'
}

Get the clip name

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.clipName)
}).catch(err => {
    console.log(err);
});

Get the clip url

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.clipUrl)
}).catch(err => {
    console.log(err);
});

Get the creator username

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.creatorUsername)
}).catch(err => {
    console.log(err);
});

Get the creator url

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.creatorUrl)
}).catch(err => {
    console.log(err);
});

Get the creator profile picture url (300x300)

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.creatorPictureUrl)
}).catch(err => {
    console.log(err);
});

Get what the creator was playing

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.creatorWasPlaying)
}).catch(err => {
    console.log(err);
});

Get when the livestream was clipped

const cliprxyz = require("cliprxyz");

cliprxyz.downloadClip("CLIP_URL").then(res => {
    console.log(res.clippedOn)
}).catch(err => {
    console.log(err);
});

Author

luisgbr1el

cliprxyz's People

Contributors

luisgbr1el avatar

Stargazers

 avatar  avatar

Watchers

 avatar

cliprxyz's Issues

add support for www.twitch.tv?

Whenever you download a clip straight from the streamers account, the link will always be something starting with https://www.twitch.tv/. Then the package outputs this error.
Clip being used: https://www.twitch.tv/brucedropemoff/clip/KitschySpeedyAnteaterTheRinger-EY92zWBphRIA5xYs
Error: Error: The clip was not found. Try a valid url.

Is there anyway you can fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.