shooter.js
fetch subtitle from shooter.cn
Install
-
via
npm
:npm install -g shooter
-
via
git
:git clone https://github.com/zyxar/shooter.js cd shooter.js/ npm install -g
Example
var Fn = APIfetch;var path = ; var args = processargv;// argv[0] === 'node'// argv[1] === 'XXX/bin/main.js'args = args; args;
Funcs
-
API.getHash(file)
- return
string
ornull
; - get four slice (4096) md5 hash values;
- return
-
API.submit(callback)
- should be called after
getHash()
; - get subtitle information of the film file;
callback(error, list)
, list is supposed to be an array with each element a metadata of a subtitle file;
- should be called after
-
API.fetch(file, callback)
- all-in-one
Class
-
FilmFile
:{/*...*/};FilmFileprototype {/*...*/};FilmFileprototype {/*...*/};
Note
- basic support for
http_proxy
orHTTP_PROXY
;