Scraper
Free scraper for WhatsApp bot or REST API
Installing
Using npm
$ npm i @danicoding/scraper
Using yarn
$ yarn add @danicoding/scraper
Example code
Import
const scraper = require("@danicoding/scraper")
Usage
$print = console.log
const q = "Dani Coding"
if (!q) $print("Params not found!")
scraper.downloader.youtube.playaudio(q)
.then(data => {
let res = data
if (!res) $print("Data not found!")
$print(data)
})
Output
{
title: 'Cara membuat bot WhatsApp menggunakan node.js & termux terbaru | Dani Coding',
thumb: 'https://i.ytimg.com/vi/rz03XDsmGSg/maxresdefault.jpg',
channel: 'Dani Coding',
published: '2022-11-10',
views: '892',
url: 'https://rr4---sn-uigxxi0ujipnvo-jb36.googlevideo.com/videoplayback?expire=1682438325&ei=VaRHZJDGKtjqz7sPhruLuAs&ip=116.206.8.36&id=o-AD0YAZ0LfN2fshzOnE2W1HPOM1zpxup2iSRMJ7_GME9y&itag=251&source=youtube&requiressl=yes&mh=tc&mm=31%2C29&mn=sn-uigxxi0ujipnvo-jb36%2Csn-npoe7nes&ms=au%2Crdu&mv=m&mvi=4&pl=24&initcwndbps=256250&vprv=1&mime=audio%2Fwebm&ns=dO3khMeJbQCiR5nAe1uMsiIM&gir=yes&clen=3680702&dur=238.121&lmt=1668110943850076&mt=1682416375&fvip=3&keepalive=yes&fexp=24007246&c=WEB&txp=6211224&n=lZX3diz5Cu1PuA&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgCWDaYHv_Y_GqWuDJ-0C19gvL6NU-32fgXzqOhcc3qeoCICZVgH04PF4hXCbiZsQm5aVcRw1lEg-0ZyI35NpD_P7x&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAPIl-JQrqPyw1_xqkckNzo423kuk4Pv1jOKY5fiT9L70AiEAm49gqf60NHUewDMg5w62ilpAGVLaPlDX5_DHeAXrDeg%3D'
}
Example code using JavaScript
example.js
List features
Downloader
- YouTube Audio: scraper.downloader.youtube.audio
- YouTube Video: scraper.downloader.youtube.video
- YouTube Play Audio: scraper.downloader.youtube.playaudio
- YouTube Play Video: scraper.downloader.youtube.playvideo
- Facebook: scraper.downloader.facebook
- Instagram: scraper.downloader.instagram
- Twitter: scraper.downloader.twitter
- TikTok: scraper.downloader.tiktok
- Mediafire: scraper.downloader.mediafire
- SfileMobi: scraper.downloader.sfilemobi
- SoundCloud: scraper.downloader.soundcloud
Search
- YouTube: scraper.search.youtube
PhotoOxy
- PhotoOxy: scraper.photooxy
TextPro
Cape ngetik, cek aja semua fiturnya di file: /lib/index.js