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 🙏

© 2026 – Pkg Stats / Ryan Hefner

axeengine

v0.1.0

Published

javascript library for resolving the real URL of online videos

Readme

#AxeEngine a javascript library for resolving the real URL of online videos which works in both Node.js and browser.

中文说明和如何取得视频ID的相关问题见wiki

Build

> git clone https://github.com/SEIAROTg/AxeEngine.git
> cd AxeEngine
> npm install
> grunt

Output files will be in <git dir>/dest/.

Test

To run test, simply run <git dir>/dest/test.js with Node.js. Make sure test.js is in the same directory as AxeEngine.js.

Load

AxeEngine works in both Node.js and browser. But actually, there can be various of environments, such as Node.js application, web page, and browser extension. Different environment may have different HTTP interface. Therefore, you need to pass HTTP handler to AxeEngine when loading.

After loading, AxeEngine will be in the global namespace (global in Node.js, window in browser).

In Node.js

var loadAxeEngine = require('axeengine');
loadAxeEngine({
    httpGet: < your HTTP handler >
});

Your HTTP handler should be a function that accepts two arguments URL and encoding and returns a Promise object which return HTTP Response Body when resolved.

In Browser

// loadAxeEngine will be automatically add into window object when including AxeEngine.js
// Suppose you have no permission to make cross-domain request
var jsonp = < your jsonp handler >;
loadAxeEngine({
    jsonp: < your jsonp handler >,
});

Your jsonp handler should accept the same arguments as HTTP handler and return a Promise object which return parsed JSON Object when resolved.

If you have permission to make cross-domain request, or do not need cross-domain, you can also pass httpGet as in Node.js.

API

Create resolver

var resolver = AxeEngine.resolverManager.create(<resolver name>, <video id>);
  • <resolver name> is the registration name of resolver. See the list at bottom.
  • <video id> is the id of the video in its site. It may be in different format in different sites and resolvers.

Get video title

resolver.getTitle().then(function(title){
    // ...
});

resolver.getTitle takes no arguments and return a Promise which returns the title in string when resolved.

Get versions

A video may have different versions in some sites.

List versions

resolver.listVersion().then(function(list){
    // ...
});

resolver.listVersion takes no arguments and return a Promise which returns a array of versions.

Get current version

resolver.listVersion().then(function(list){
    index = resolver.getCurrentVersion();
    version = list[index];
});

resolver.getCurrentVersion returns current version index in version list.

Switch version

resolver.switchVersion(< index >).then(function(){
    // ...
});
  • <index> is the index of the new version in the version list

Get qualities

A video usually have multiple qualities.

List qualities

resolver.listQuality().then(function(list){
    // ...
});

resolver.listQuality takes no arguments and return a Promise which returns a array of qualities.

Get current version

resolver.listVersion().then(function(list){
    index = resolver.getCurrentVersion();
    version = list[index];
});

resolver.getCurrentVersion returns current version index in version list.

Switch version

resolver.switchVersion(< index >).then(function(){
    // ...
});
  • <index> is the index of the new version in the version list

LICENSE

GNU Affero General Public License 3.0

Supported Site List

| Site | Resolver name | M3U | multi-version | multi-quality | | --------------- |---------------|:-----:|:-------------:|:-------------:| | v.youku.com | youku | Y | Y | Y | | tv.sohu.com | sohu | N | - | Y | | my.tv.sohu.com | sohu | N | - | Y | | www.letv.com | letv | Y | - | Y | | www.iqiyi.com | iqiyi | N | - | Y |