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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@saipulanuar/scraper

v3.0.0

Published

scraper module

Downloads

5,652

Readme

scraper

Install package

npm i @saipulanuar/scraper

Install latest version from github (not recommended)

npm i github:saipulanuar/scraper

What's updated?

  • Using zod to validate data input and output. (not finished yet)
  • Some bug fixes.
  • Breaking changes. see this
  • Added didyoumean to search for similar words.
  • Added snapsave
  • Added zippyshare
  • Added sfilemobi

Example use

// ESM 
import * as scraper from '@saipulanuar/scraper'
// CJS
const scraper = require('@saipulanuar/scraper')

Instagram Downloader

// Instagram Downloader
import { 
    instagramdl, 
    instagramdlv2, 
    instagramStory,
    instagramStoryv2
} from '@saipulanuar/scraper'
const url = 'https://www.instagram.com/reel/CXK49yFLtJ_/?utm_source=ig_web_copy_link'
instagramdl(url).then(console.log).catch(console.error)
instagramdlv2(url).then(console.log).catch(console.error)
// use both to handle error
instagramdl(url).catch(_ => instagramdlv2(url)).then(console.log)
// Use async/await or top level await
console.log(await instagramdl(url).catch(console.error))
console.log(await instagramdlv2(url).catch(console.error))
// Instagram Story downloader
const username = 'freefirebgid'
const story = await instagramStory(username).catch(async _ => await instagramStoryv2(username))
console.log(story)
  • instagramdl use website https://snapinsta.app,
  • instagramdlv2 use website https://downloadgram.org
  • instagramdlv3 use website https://downvideo.quora-wiki.com
  • instagramdlv4 use website https://instadownloader.co
  • instagramStory use website https://storydownloader.app
  • instagramStoryv2 use website https://www.instadp.com [not working]

Youtube Downloader

// Youtube downloader
import { 
    youtubedl,
    youtubedlv2 
} from '@saipulanuar/scraper'
const url = 'https://youtu.be/iik25wqIuFo'
youtubedl(url).catch(_ => youtubedlv2(url)).then(({ video }) => {
    video['240p'].download().then(console.log).catch(console.error)
})
// Use async/await 
const yt = await youtubedl(url).catch(async () => await  youtubedlv2(url))
const dl_url = await yt.video['240p'].download()
console.log(dl_url)
  • youtubedl use website https://www.y2mate.com
  • youtubedlv2 use website https://yt5s.com
  • youtubedlv3 use website https://onlinevideoconverter.pro
  • youtubeSearch use website https://www.youtube.com

Tiktok downloader

// Tiktok downloader
import { 
    tiktokdl,
    tiktokdlv2 
} from '@saipulanuar/scraper'
// Tiktok downloader v1
const url = 'https://www.tiktok.com/@tiktok/video/6844446901010982300'
tiktokdl(url).then(console.log).catch(console.error)
// tiktokdl v2
tiktokdlv2(url).then(console.log).catch(console.error)
// async / await 
console.log(await tiktokdl(url).catch(console.error))
console.log(await tiktokdlv2(url).catch(console.error))
  • tiktokdl use website https://snaptik.app
  • tiktokdlv2 use website https://api.tikmate.app
  • tiktokdlv3 use website 'https://ssstik.io
  • tiktokfyp use website https://t.tiktok.com [Not Working]

All in One Downloader

import {
    aiovideodl,
    savefrom,
    snapsave
} from '@saipulanuar/scraper'
// Facebook video downloader
console.log(await aiovideodl('https://fb.watch/9WktuN9j-z/'))
// Twitter video downloader
console.log(await aiovideodl('https://twitter.com/jen_degen/status/1458167531869458440?s=20'))

// Tiktok downloader
console.log(await savefrom('https://www.tiktok.com/@omagadsus/video/7025456384175017243?is_from_webapp=1&sender_device=pc&web_id6982004129280116226'))
// Instagram downloader
console.log(await savefrom('https://www.instagram.com/reel/CXK49yFLtJ_/?utm_source=ig_web_copy_link'))

// Instagram downloader
console.log(await snapsave('https://www.instagram.com/reel/CXK49yFLtJ_/?utm_source=ig_web_copy_link'))
// Facebook video downloader
console.log(await snapsave('https://fb.watch/9WktuN9j-z/'))
  • aiovideodl use website https://aiovideodl.ml [Not Working]
  • savefrom use website https://id.savefrom.net
  • snapsave use website https://snapsave.app

Aksara Jawa

// Aksara jawa
import { 
    latinToAksara,
    aksaraToLatin
} from '@saipulanuar/scraper'
// Latin to aksara jawa
console.log(latinToAksara('hallo rek'))
// Aksara jawa to latin
console.log(aksaraToLatin('ꦲꦭ꧀ꦭꦺꦴ​ꦫꦺꦏ꧀', { HVokal: false })) // Hvokal: false mean ꦲ will return 'ha' not vokal

Source: https://bennylin.github.io/transliterasijawa/

Primbons

// Primbons
import { 
    getZodiac,
    nomorhoki
} from '@saipulanuar/scraper'
// Get zodiac
console.log(getZodiac(1, 1))
// Get nomor hoki
console.log(await nomorhoki(6213353))
  • artimimpi use website https://www.primbon.com
  • artiname use website https://www.primbon.com
  • nomorhoki use website https://www.primbon.com
  • getZodiac source: https://github.com/Nurutomo/wabot-aq/blob/master/plugins/zodiac.js

Images

// Images
import {
    googleImage,
    pinterest,
    wallpaper,
    stickerTelegram,
} from '@saipulanuar/scraper'
const keyword = 'minecraft'
// Google image
console.log(await googleImage(keyword))
// Pinterest image
console.log(await pinterest(keyword))
// Wallpaper
console.log(await wallpaper(keyword))
// Sticker telegram
console.log(await stickerTelegram(keyword))
  • googleImage use website https://www.google.com
  • pinterest use website https://www.pinterest.com
  • stickerTelegram use website https://combot.org
  • stickerLine use website https://store.line.me
  • wallpaper use website https://www.shutterstock.com
  • wallpaperv2 use website https://wall.alphacoders.com
  • wallpaperv3 use website https://www.hdwallpapers.in

Religions

// Religions
import {
    asmaulhusna, asmaulhusnajson,
    alquran,
    jadwalsholat, listJadwalSholat
} from '@saipulanuar/scraper'
// Asmaul Husna
console.log(await asmaulhusna())
// Asmaul Husna Json
console.log(asmaulhusnajson) // the json will empty if you never use `asmaulhusna()`
// alquran 
console.log(await alquran())
// Jadwal Sholat
console.log(await jadwalsholat('semarang'))
  • alquran source: https://raw.githubusercontent.com/rzkytmgr/quran-api/master/data/quran.json
  • asmaulhusna source: https://raw.githubusercontent.com/SaipulAnuar/database/master/religi/asmaulhusna.json
  • jadwalsholat use website https://www.jadwalsholat.org

Games

// Games
import {
    tebakgambar, tebakgambarjson,
    asahotak, asahotakjson
} from '@saipulanuar/scraper'
// Tebak gambar
console.log(await tebakgambar())
// Tebak gambar json
console.log(tebakgambarjson) // the json will empty if you never use `tebakgambar()`
// Asahotak
console.log(await asahotak())
// Asahotak json
console.log(asahotakjson) // the json will empty if you never use `asahotak()`
  • asahotak source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/asahotak.json
  • caklontong source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/caklontong.json
  • family100 source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/family100.json
  • siapakahaku source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/siapakahaku.json
  • susunkata source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/susunkata.json
  • tebakbendera source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebakbendera.json
  • tebakgambar source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebakgambar.json
  • tebakkabupaten source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebakkabupaten.json
  • tebakkata source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebakkata.json
  • tebakkimia source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebakkimia.json
  • tebaklirik source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebaklirik.json
  • tebaktebakan source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tebaktebakan.json
  • tekateki source: https://raw.githubusercontent.com/SaipulAnuar/database/master/games/tekateki.json

News

// News
import {
    cnbindonesia,
    antaranews,
    kompas
} from '@saipulanuar/scraper'
// Cnbindonesia
console.log(await cnbindonesia())
// Antaranews
console.log(await antaranews())
// Kompas
console.log(await kompas())
  • antaranews use website https://www.antaranews.com
  • cnbindonesia use website https://www.cnbcindonesia.com
  • kompas use website https://www.kompas.com
  • liputan6 use website https://www.liputan6.com
  • merdeka use website https://www.merdeka.com
  • suaracom use website https://www.suara.com

Encryption

// Encryption
import {
    toBase64,
    fromBase64ToString,
    randomUUID,
    randomBytes,
    createHash
} from '@saipulanuar/scraper'
// To base64
const base64 = toBase64('Hello World!!')
console.log(base64)
// From base64 to string
console.log(fromBase64ToString(base64)) // 'Hello World!!'
// Random UUID
console.log(randomUUID())
// Random Bytes
console.log(randomBytes(16))
// Hash
console.log(createHash('sha256', 'Hello World!!'))
  • randomUUID source: https://github.com/uuidjs/uuid/blob/main/src/v4.js and https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js
  • randomBytes use crypto module
  • createHash use crypto module

Bioskop

// Bioskop
import {
    bioskopNow,
    bioskop
} from '@saipulanuar/scraper'
// Bioskop 
console.log(await bioskop())
// Bioskop Now
console.log(await bioskopNow())
  • bioskop use website https://jadwalnonton.com
  • bioskopNow use website https://jadwalnonton.com

Downloader

import {
    mediafiredl,
    sfilemobi,
    sfilemobiSearch,
    zippyshare
} from '@saipulanuar/scraper'
// Mediafire
console.log(await mediafiredl('https://www.mediafire.com/file/gpeiucmm1xo6ln0/hello_world.mp4/file'))
// Sfilemobi
console.log(await sfilemobi('https://sfile.mobi/oGm8kAIQCs7'))
// Sfilemobi Search
console.log(await sfilemobiSearch('minecraft'))
// Zippyshare
console.log(await zippyshare('https://www53.zippyshare.com/v/Gajlfjd4/file.html'))
  • mediafiredl use website https://www.mediafire.com
  • sfilemobi use website https://www.sfilemobi.com
  • sfilemobiSearch use website https://www.sfilemobi.com
  • zippyshare use website https://www.zippyshare.com

Chord

import {
    chord
} from '@saipulanuar/scraper'
// Chord
console.log(await chord('Until i found you'))
  • chord use website https://www.gitagram.com

Breaking Changes

- from v2.0.0 to v3.0.0

  • savefrom now output array of object instead of object
  • asmaulhusna optionally can take index parameter to get the asmaulhusna of that index (default is random 1-99)