New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

4chan-list-webm

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

4chan-list-webm

List all webms within a 4chan thread

  • 2.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
56
increased by55.56%
Maintainers
1
Weekly downloads
 
Created
Source

4chan-list-webm

Given a board and thread number, returns an array of objects containing the filename, webm and thumbnail URLs.

Here's a little demonstration of 4chan-list-webm in action.

Because CORS is only supported with an origin of http(s)://boards.4chan.org, this module does not work in the browser; it only works with Node.js.

Rate limits

As stated in the 4chan API, you must ensure that you do not make more than one request per second. It is your responsiblity to ensure that the request limit is respected. I recommend using limiter or bottleneck.

Thumbnails

You will get an 403 Forbidden error if you try to load the thumbnails via inline linking (eg. changing the src attribute of an <img> via JavaScript, or hard-coding it). You can still download these images via a proxy server and serve them there.

Installation

# yarn
$ yarn add 4chan-list-webm

# npm
$ npm install 4chan-list-webm --save

Usage

const listWebms = require('4chan-list-webm')

// Consider the following URL: http://boards.4chan.org/wsg/thread/2045456
// The board is 'wsg' and the thread number is 2045456
// Note: This thread will likely 404 by the time you see this

listWebms('wsg', 2045456, function (webms) {
  console.log(webms)
})

The data looks like this:

[{ "filename": "1478018951860",
    "url": "http://i.4cdn.org/wsg/1514757619690.webm",
    "thumbnail": "http://i.4cdn.org/wsg/1514757619690s.jpg" },
 { "filename": "1505294337138",
    "url": "http://i.4cdn.org/wsg/1514834417503.webm",
    "thumbnail": "http://i.4cdn.org/wsg/1514834417503s.jpg" }]

Options

OptionDescriptionType
httpsUse https instead of httpBoolean

Why?

¯\_(ツ)_/¯

Disclaimer

The creator of 4chan-list-webm is not associated with 4chan.org in any way.

Keywords

FAQs

Package last updated on 28 Jan 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc