Giter Site home page Giter Site logo

zearibrahim / zscraper Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 28 KB

Node.js module to scrape Zoom meeting and participant data manually using Puppeteer.

License: MIT License

JavaScript 91.06% TypeScript 8.94%
puppeteer zoom zoom-meetings automation headless-chrome nodejs scraper scraperjs web zoom-us

zscraper's Introduction

zscraper

Node.js module to scrape Zoom participant data manually using Puppeteer.

Notes

This module scrapes Zoom conference participant data by visiting the reporting pages for your organisation. Authentication is handled manually and requires users to approve the login attempt through a pre-configured authenticator app.

This module maybe useful for users when:

  • They cannot configure or use the Zoom API,
  • The Zoom account is restricted by their organisation:
    • Microsoft Active Directory prevents them from authorising their application,
    • Microsoft Active Directory/2FA authentication policy prevents them from requesting TOTP tokens in their application,
    • The account has API limits or is not part of a Zoom Pro Plan.

Installation

$ npm i zscraper

Example

Import ZoomScraper and Puppeteer modules

import ZoomScraper from "zscraper";
import Puppeteer from "puppeteer";

Create a Puppeteer Instance

// Setup Puppeteer options
const puppeteerOptions = {
    headless: false,
    defaultViewport: null,
};

// Creates puppeteer/chromium instance
const browser = await Puppeteer.launch(puppeteerOptions);
const page = await browser.newPage();

Create a ZoomScraper Instance

Note: Organisation must hold an active Zoom license
// Instantiate scraper with your organisations' name
const zoom = new ZoomScraper("navitas");

Login To Zoom

In this version, the Zoom login method requires manual approval through a pre-configured authenticator such as a mobile phone. If no approval is given, this method will time out.

// Login to given organisation with user name and password
await zoom.login(page, ZOOM_ID, ZOOM_PASSWORD);

Retrieve Meeting Data

This method returns all meetings between the given dates in mm/dd/yyyy format.

// Get meetings as custom data object between _from and _to dates.
const meetings = await zoom.getMeetings(page, "04/01/2022", "04/03/2022");

Output

Once pupulated, the meeting object may be printed in accordance with the Meeting Interface Types.

// Print all details
console.log(meetings[0]);

// or

// Print host email for particular meeting
console.log(meetings[0].host);

// or

// Print participant details for particular meeting
console.log(meetings[0].participants);

Meeting Interface Types

The meetings object holds a list of meetings represented by the IZoomMeetings interface type.

interface IZoomMeetings extends Array<IZoomMeeting> { }

Individual meetings are represented by the IZoomMeeting interface type.

interface IZoomMeeting {
    id: string;
    topic: string;
    date: string;
    timeFromTopic: string;
    host: string;
    participants: IZoomParticipants;
}

The participants property in IZoomMeeting holds a list of paticipants represented by the IZoomParticipants interface type.

interface IZoomParticipants extends Array<IZoomParticipant> { }

A single participant is represented through the IZoomParticipant interface type:

interface IZoomParticipant {
    name: string;
    email: string;
    duration: string;
    guest: string;
}

How To Run

Place the example code in an index.js file at the root of a new Node.js project.

$ node index.js

# or if running with .env variables

$ node -r dotenv/config index.js

Licence

MIT © Zear Ibrahim

zscraper's People

Contributors

zearibrahim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.