Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@magnet.me/site-diff

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@magnet.me/site-diff

Pull a web page, select a part based on a selector, and check whether it changed with respect to the previous hash.

unpublished
latest
npmnpm
Version
1.1.2
Version published
Maintainers
4
Created
Source

Magnet.me

Dependency Status

Site diff

Pull a web page, select a part based on a selector, and check whether it changed with respect to the previous hash.

To query without a previous hash: http://site-diff/changed?url=https%3A%2F%2Fmagnet.me%2F&selector=body

To query with a previous hash: http://site-diff/changed?url=https%3A%2F%2Fmagnet.me%2F&selector=body&hash=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Then return a json object so the caller can see whether it should take action.

{
  "hashes": {
     "previous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
     "new": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
  },
  "changed": false,
  "empty": false,
  "found": "",
  "prerendered": true,
  "selector": "#currentPageInfo",
  "url": "https://magnet.me/sdfdsf"
}

Optionally pass in a PRERENDER_URL env var to ensure that the content is passed through a prerender service. That way any Javascript can be executed so dynamic pages can be crawled as well.

FAQs

Package last updated on 21 Jun 2019

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