New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hotfetch

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotfetch

Scrape pages and extract data in ease

latest
Source
npmnpm
Version
2.1.9
Version published
Maintainers
1
Created
Source

hotfetch

Scrape pages and extract data in ease

Get Started

Here is a simple explanation to start using HotFetch without a problem

Installing

First you have to install the package through one of the following commands:

npm i hotfetch

# or with Yarn
yarn add hotfetch

If you encounter a problem with temporary files or any other problem with the installation process, you can install HotFetch through one of the following commands:

npm i toctive-com/hotfetch

# or with Yarn
yarn add toctive-com/hotfetch

You will get the same result in the end as both packages HotFetch and toctive-com/hotfetch contain exactly the same code but both in different registry

  • hotfetch in NPM Registry
  • toctive-com/hotfetch in GitHub Packages Registry (GPR)

How to use

basics

First import HotFetch class from hotfetch and create a new instance:

import axios from "axios";
import HotFetch from "hotfetch";

// download the HTML content of a web page
axios.get("https://stackoverflow.com/questions").then((res) => {
  const hf = new HotFetch();
  hf.loadHTML(res.data);

  // structure of the data you want to get
  const result = hf.extract({
    title: { selector: "h1" },
  });

  console.log(result); // { title: All Questions }
});

Keywords

scrape

FAQs

Package last updated on 07 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts