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

spn2

v1.0.3

Published

The SPN2 JS Library provides an easy-to-use interface to interact with the Save Page Now 2 (SPN2) API, which is part of the Internet Archive's Wayback Machine service.

Downloads

18

Readme

Save Page Now 2 for Wayback Machine

The SPN2 JS Library provides an easy-to-use interface to interact with the Save Page Now 2 (SPN2) API, which is part of the Internet Archive's Wayback Machine service.

API Docs Source: Google Docs

Installation

npm install -g spn2

OR

pnpm install -g spn2

OR

yarn global add spn2

Usage

See test.ts for usage examples.

Error Codes

| status_ext | Description | | --- | --- | | error:bad-gateway | Bad Gateway for URL (HTTP status=502). | | error:bad-request | The server could not understand the request due to invalid syntax. (HTTP status=401) | | error:bandwidth-limit-exceeded | The target server has exceeded the bandwidth specified by the server administrator. (HTTP status=509). | | error:blocked | The target site is blocking us (HTTP status=999). | | error:blocked-client-ip | Anonymous clients which are listed in https://www.spamhaus.org/xbl/ or https://www.spamhaus.org/sbl/ lists (spams & exploits) are blocked. Tor exit nodes are excluded from this filter. | | error:blocked-url | We use a URL block list based on Mozilla web tracker lists to avoid unwanted captures. | | error:browsing-timeout | SPN2 back-end headless browser timeout. | | error:capture-location-error | SPN2 back-end cannot find the created capture location. (system error). | | error:cannot-fetch | Cannot fetch the target URL due to system overload. | | error:celery | Cannot start capture task. | | error:filesize-limit | Cannot capture web resources over 2GB. | | error:ftp-access-denied | Tried to capture an FTP resource but access was denied. | | error:gateway-timeout | The target server didn't respond in time. (HTTP status=504). | | error:http-version-not-supported | The target server does not support the HTTP protocol version used in the request for URL (HTTP status=505). | | error:internal-server-error | SPN internal server error. | | error:invalid-url-syntax | Target URL syntax is not valid. | | error:invalid-server-response | The target server response was invalid. (e.g. invalid headers, invalid content encoding, etc). | | error:invalid-host-resolution | Couldn’t resolve the target host. | | error:job-failed | Capture failed due to system error. | | error:method-not-allowed | The request method is known by the server but has been disabled and cannot be used (HTTP status=405). | | error:not-implemented | The request method is not supported by the server and cannot be handled (HTTP status=501). | | error:no-browsers-available | SPN2 back-end headless browser cannot run. | | error:network-authentication-required | The client needs to authenticate to gain network access to the URL (HTTP status=511). | | error:no-access | Target URL could not be accessed (status=403). | | error:not-found | Target URL not found (status=404). | | error:not-implemented | The request method is not supported by the server and cannot be handled for URL (HTTP status=501). | | error:proxy-error | SPN2 back-end proxy error. | | error:protocol-error | HTTP connection broken. (A possible cause of this error is “IncompleteRead”). | | error:read-timeout | HTTP connection read timeout. | | error:soft-time-limit-exceeded | Capture duration exceeded 45s time limit and was terminated. | | error:service-unavailable | Service unavailable for URL (HTTP status=503). | | error:too-many-daily-captures | This URL has been captured 10 times today. We cannot make any more captures. | | error:too-many-redirects | Too many redirects. SPN2 tries to follow 3 redirects automatically. | | error:too-many-requests | The target host has received too many requests from SPN and it is blocking it. (HTTP status=429). Note that captures to the same host will be delayed for 10-20s after receiving this response to remedy the situation. | | error:user-session-limit | User has reached the limit of concurrent active capture sessions. | | error:unauthorized | The server requires authentication (HTTP status=401). |

License

GPL-3.0

Author: Ramazan Sancar