Node wrapper around line-sticker-downloder
.
import * as lsdl from 'lsdl-wrapper';
const sticker: Promise<void> = lsdl("7457240");
sticker.then(() => {
// Behavior when successful
// The file is saved in the current directory
});
lsdl.async("7457240", "downloads");
// The file is saved in the downloads directory
const options: { [key: string]: boolean } = {
animation: true,
gif: true,
sound: true
};
lsdl("11978", "downloads", options);
// or: lsdl("11978", "", options);
// or: lsdl("11978", null, options);
// or: lsdl("https://store.line.me/stickershop/product/11978/ja", "downloads", options);
// or: lsdl.async("11978", "downloads", options);
import * as lsdl from 'lsdl-wrapper';
const ID_or_URL = "7457240"; // https://store.line.me/stickershop/product/7457240/ja
const dir = "downloads";
const sticker: Promise<void> = lsdl(ID_or_URL, dir);
sticker.then((): void => {
console.log('OK!');
});
$ ts-node example.ts
OK!
$ tree downloads
downloads
βββ Akatsuki_UNI_sticker_#1
βββ @2x_key_png
βΒ Β βββ 180117102@2x_key.png
βΒ Β βββ 180117103@2x_key.png
βΒ Β βββ 180117104@2x_key.png
βΒ Β βββ 180117106@2x_key.png
βΒ Β βββ 180117108@2x_key.png
βΒ Β βββ 180117110@2x_key.png
βΒ Β βββ 180117112@2x_key.png
βΒ Β βββ 180117114@2x_key.png
βΒ Β βββ 180117116@2x_key.png
βΒ Β βββ 180117118@2x_key.png
βΒ Β βββ 180117120@2x_key.png
βΒ Β βββ 180117122@2x_key.png
βΒ Β βββ 180117124@2x_key.png
βΒ Β βββ 180117126@2x_key.png
βΒ Β βββ 180117128@2x_key.png
βΒ Β βββ 180117129@2x_key.png
βΒ Β βββ 180117130@2x_key.png
βΒ Β βββ 180117131@2x_key.png
βΒ Β βββ 180117133@2x_key.png
βΒ Β βββ 180117134@2x_key.png
βΒ Β βββ 180117135@2x_key.png
βΒ Β βββ 180117136@2x_key.png
βΒ Β βββ 180117137@2x_key.png
βΒ Β βββ 180117142@2x_key.png
βββ @2x_png
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βΒ Β βββ [email protected]
βββ key_png
βΒ Β βββ 180117102_key.png
βΒ Β βββ 180117103_key.png
βΒ Β βββ 180117104_key.png
βΒ Β βββ 180117106_key.png
βΒ Β βββ 180117108_key.png
βΒ Β βββ 180117110_key.png
βΒ Β βββ 180117112_key.png
βΒ Β βββ 180117114_key.png
βΒ Β βββ 180117116_key.png
βΒ Β βββ 180117118_key.png
βΒ Β βββ 180117120_key.png
βΒ Β βββ 180117122_key.png
βΒ Β βββ 180117124_key.png
βΒ Β βββ 180117126_key.png
βΒ Β βββ 180117128_key.png
βΒ Β βββ 180117129_key.png
βΒ Β βββ 180117130_key.png
βΒ Β βββ 180117131_key.png
βΒ Β βββ 180117133_key.png
βΒ Β βββ 180117134_key.png
βΒ Β βββ 180117135_key.png
βΒ Β βββ 180117136_key.png
βΒ Β βββ 180117137_key.png
βΒ Β βββ 180117142_key.png
βββ png
βββ 180117102.png
βββ 180117103.png
βββ 180117104.png
βββ 180117106.png
βββ 180117108.png
βββ 180117110.png
βββ 180117112.png
βββ 180117114.png
βββ 180117116.png
βββ 180117118.png
βββ 180117120.png
βββ 180117122.png
βββ 180117124.png
βββ 180117126.png
βββ 180117128.png
βββ 180117129.png
βββ 180117130.png
βββ 180117131.png
βββ 180117133.png
βββ 180117134.png
βββ 180117135.png
βββ 180117136.png
βββ 180117137.png
βββ 180117142.png
5 directories, 96 files
Write the sticker data from the sticker
to out_path
. Returns a Promise which is resolved when out_path
exists.
If out_path
is omitted, it defaults to current directory.
You can specify not only a sticker ID but also a URL for the sticker
.
animation
: Save the animation stickers as APNG.effect
: Save the effect stickers as APNG.gif
: Convert animation stickers or effect stickers to GIF and save.sound
: Save sticker sounds with sound in m4a.custom
: Custom sticker download Only. (Cannot be used with any other option)manga
: Manga sticker download Only. (Cannot be used with any other option)
All options
values ββare set with boolean
.
Writes sticker data from sticker
to out_path
synchronously.
If out_path
is omitted, it defaults to current directory.
You can specify not only a sticker ID but also a URL for the sticker
.
animation
: Save the animation stickers as APNG.effect
: Save the effect stickers as APNG.gif
: Convert animation stickers or effect stickers to GIF and save.sound
: Save sticker sounds with sound in m4a.custom
: Custom sticker download Only. (Cannot be used with any other option)manga
: Manga sticker download Only. (Cannot be used with any other option)
All options
values ββare set with boolean
.