
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
4chan-list-webm
Advanced tools
Generate a list of webms posted in a thread.
Here's a little demonstration of 4chan-list-webm
in action (plz star).
$ yarn add 4chan-list-webm
# OR
$ npm install --save 4chan-list-webm
const listWebms = require('4chan-list-webm')
// promise
listWebms('wsg', 2045456)
.then(data => console.log(data.webms))
.catch(err => console.error('404!', err))
// async/await
async function run () {
try {
const data = await listWebms('http://boards.4chan.org/wsg/thread/2045456')
console.log(data)
} catch (err) {
console.error('Whoa! 404! :c', err)
}
}
run()
Returns a promise that resolves to data about webms within a thread (see payload).
Type: String
The URL of the thread. The thumbnail and webm links will use https
if an https
request is made.
Type: String
The short-name of the board, eg. 'wsg'
, 'b'
, etc.
Type: Number
The thread number of the target thread. For example, 2312676
is the thread number of http://boards.4chan.org/wsg/thread/2312676
Type: Object
A configuration object, see details below.
Type: Boolean
Property that determines whether to use https
. Setting the key to true
enables https
.
Below an example payload. Note that the subject key will be omitted if the thread has no subject.
{
"subject": "Hawkeye being epic in other roles",
"webms": [
{
"filename": "1534288775634",
"url": "http://i.4cdn.org/wsg/1534332395477.webm",
"thumbnail": "http://i.4cdn.org/wsg/1534332395477s.jpg"
},
{
"filename": "1534288802449",
"url": "http://i.4cdn.org/wsg/1534332452014.webm",
"thumbnail": "http://i.4cdn.org/wsg/1534332452014s.jpg"
},
{
"filename": "1534288878879",
"url": "http://i.4cdn.org/wsg/1534332526405.webm",
"thumbnail": "http://i.4cdn.org/wsg/1534332526405s.jpg"
},
{
"filename": "Dahmer (2002)",
"url": "http://i.4cdn.org/wsg/1534799616292.webm",
"thumbnail": "http://i.4cdn.org/wsg/1534799616292s.jpg"
},
{
"filename": "Bourne_legacy",
"url": "http://i.4cdn.org/wsg/1535117894788.webm",
"thumbnail": "http://i.4cdn.org/wsg/1535117894788s.jpg"
}
]
}
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. The ONLY exception to this is if you're creating a Chrome plugin, with http(s)://boards.4chan.org
set as the origin.
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.
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.
¯\_(ツ)_/¯
The creator of 4chan-list-webm
is not associated with 4chan.org in any way.
FAQs
Generate a list of webms posted in a 4chan thread
The npm package 4chan-list-webm receives a total of 11 weekly downloads. As such, 4chan-list-webm popularity was classified as not popular.
We found that 4chan-list-webm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.