Socket
Socket
Sign inDemoInstall

4chan-full

Package Overview
Dependencies
139
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    4chan-full

www.4chan.org non-official read only api


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

4CHAN-FULL 🎉

www.4chan.org non-official read only api.


Installation

npm install 4chan-full

Possibilities


Example Basic Thread Files Downloader Example

// To be honest there is no good examples to use. :D
let FCHF = require("4chan-full");
let download = require("download");

// URL Prefix -------------------+--> https://github.com/Armagann/data-pipe
// Thread Code -------+          |
// Board Code --+     |          |
//              |     |          |
FCHF.getThread("w","2148861", "https://kao-datapipe-2.herokuapp.com/").then(thread=>{
    console.log("subject", thread.subject)
    console.log("isArchived", thread.isArchived)
    thread.posts.forEach((post, index)=>{
        console.log(index, "", post.message)
        if (post.file.exists) {
            //                                              Size in KB
            console.log(post.file.url, post.file.name, post.file.size.size, post.file.size.width, post.file.size.height);
            setTimeout(()=>{
                download("https://kao-datapipe-1.herokuapp.com/"+post.file.url, "wallpapers", {
                    filename: post.file.name
                })
            }, (index*(Math.random()*1000))+1)
        }
    });
});


Update 1.0.7

  • In file object changed property exists to isExists
  • Added file object to isSpoiler property
  • Now you can get board's archive directly form getBoard

Update 1.0.6

You can get thread directly from getBoard response or getPopularThreads response. Example:

FCHF.getBoard().then(async board=>{
    let firstThread = await board.threads[0].thread();
    console.log(firstThread);
})

Keywords

FAQs

Last updated on 12 Sep 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc