constScrapper=require('@bogomolov.tech/scrapper');constscrapper=newScrapper();// http and https are possiblescrapper.setQuery(`https://example.com`);// or scrapper.setQuery(url, options);// options are the same as for Node.JS 'https' module scrapper.setExtractor(response=>{// extract data here// e.g. get headerconstmatches=response.match(/<h1>(?<header>.*?)<\/h1>/);returnmatches.groups.header;});scrapper.setSaveCallback(extracted=>{// e.g. save to db or file here});// by default it will follow redirects// disable it with:// scrapper.setFollowRedirects(false)awaitscrapper.extract();