Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

facebook-messenger-scraper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebook-messenger-scraper

Scrapes Group Chat Messages and Outputs in various formats

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Facebook Messenger Scraper

Scrapes Group Chat Images / Messages

Config Details

Get Config Details from /ajax/mercury/delivery_receipts.php AJAX call for group thread on https://www.facebook.com/messages

  • MESSAGE_COUNT - no larger than 17500
  • MESSAGE_START - 2015-9-10 (Year, Month, Day) - North American Format

Example

const fs = require("fs");

const Scrape = require("facebook-messenger-scraper");
const Config = require("./config.json");

(() => {

    const outputFile = "./messages.html";

    try {

        let scraper = new Scrape(Config);

        scraper.requestMessages().then((messages) => {

            // Validate before anything
            Scrape.validate(messages);

            // Get stats of Messages
            let stats = Scrape.getStats(messages);

            // Get List of Images
            let images = Scrape.getImages(messages);

            // Get List of Chats
            let chats = Scrape.getChats(messages);

            // Output Images to HTML file
            let html = Scrape.formatImagesHTML(messages, outputFile);
            fs.writeFileSync(outputFile, html);

        }).catch((error) => {
            console.error(error);
        });

    } catch (error) {
        console.error(error);
    }

})();

FAQs

Package last updated on 19 Sep 2016

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