GithubHelp home page GithubHelp logo

amanraj1608 / google-meet-scheduler Goto Github PK

View Code? Open in Web Editor NEW
189.0 1.0 38.0 240 KB

๐Ÿ˜ด Attends classes for you.

Home Page: https://meet-scheduler.glitch.me/

JavaScript 57.90% Shell 0.64% EJS 41.46%
google-meet puppeteer headless google-meet-scheduler bot chromium

google-meet-scheduler's Introduction

Google Meet Scheduler

Join's meet link for you ๐Ÿ˜ด

Bot for scheduling and entering google meet sessions automatically.

New Features
  • Saving RAM: Using same browser for all meet pages
  • Multiple meet logic added

Installation Guide

  1. Open terminal on your PC
  2. Clone the repo git clone https://github.com/AmanRaj1608/Google-Meet-Scheduler.git
  3. Go inside the project directory
  4. Rename .env-example file to .env and replace your email and password there
  5. Install dependencies npm install
  6. Start the application npm start

Now the project has started on localhost:3000

Usage Guide

Now when you visit the page you will see things to add

  • Meet Link
  • Start Time
  • End time

Then submit and do what you wanted to, it will log in and join meet for you.

You can add more links there to add it to the queue.

Requirements

If you want to see the whole process

On line 16 of server.js file you can see a variable name head=false;

If you want to see bot automatically opening the page and filling login values and joining meet link then you can set the headless as flase.

But while for deployment we need headless as true.

Deployment

If you want to deploy your instance of app you need it to set it up properly. The main problem on deployment is that after deployment it will be hosted on different IP and when bot tries to sign in Google will ask to login again with one time password.

More details here Issue #1

I recommend using digitalocean

Todo

You can however deploy it by creating an API that will ask for OTP and while sign-in you give that info to the server. This can be implemented as a new branch especially for deployment purpose

How it works

Project is made using Puppeteer which is a Node library which provides a high-level API to control headless Chrome or Chromium. We open a chromium app on server where we can add create open tabs see browser versions and everything.

So here we are using puppeteer-extra and puppeteer-extra-plugin-stealth which helps in creating an instance of chrome where google don't able to detect that it is created by puppeteer. So using this plugin we can login into google without filling capcha.


Made with โค๏ธ by Aman Raj

```

google-meet-scheduler's People

Contributors

amanraj1608 avatar dependabot-preview[bot] avatar gautamkrishnar avatar meispi avatar samadritsarkar2 avatar srujandeshpande avatar ujjwal0501 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

google-meet-scheduler's Issues

Adding codes/nicknames as a joining option

I think it would be very beneficial to add this feature because not all people use links, like in a G-Suite organization. I know from experience we use codes/nicknames and the URLs are not announced.

App is not working

``> [email protected] start

node server.js

App listening on port 3000
Request for joining meet https://meet.google.com/igt-kdtj-bgm
Request for leaving meet https://meet.google.com/igt-kdtj-bgm
/home/aaloks/Desktop/Meet-Scheduler/Google-Meet-Scheduler/google-meet.js:88
await this.browser.close();
^

TypeError: Cannot read property 'close' of undefined
at GoogleMeet.end (/home/aaloks/Desktop/Meet-Scheduler/Google-Meet-Scheduler/google-meet.js:88:28)
at Timeout._onTimeout (/home/aaloks/Desktop/Meet-Scheduler/Google-Meet-Scheduler/server.js:52:21)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)

how to use it help me pls

[email protected] start
node server.js

node:internal/modules/cjs/loader:928
throw err;
^

Error: Cannot find module 'dotenv'
Require stack:

  • F:\Google-Meet-Scheduler-master\Google-Meet-Scheduler-master\server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (F:\Google-Meet-Scheduler-master\Google-Meet-Scheduler-master\server.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'F:\Google-Meet-Scheduler-master\Google-Meet-Scheduler-master\server.js'
    ]
    }
    npm ERR! code 1
    npm ERR! path F:\Google-Meet-Scheduler-master\Google-Meet-Scheduler-master
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node server.js

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Bo\AppData\Local\npm-cache_logs\2021-01-14T02_12_17_479Z-debug.log
PS F:\Google-Meet-Scheduler-master\Google-Meet-Scheduler-master>

Won't execute meet even after scheduling the time

Additionally, can you plz specify the time/schedule format, i followed the png in the repo.
P.S.: Pls ignore the wrong date given on the screenshot, I had changed it correctly later. Also did configure the EMail and Password. Still didn't work.

Screenshot from 2020-08-20 11-46-26
Screenshot from 2020-08-20 11-49-45

Problem on Heroku

There was some problem on Heroku.

I added and deployed then to a screenshot of whats the actual problem.
I took a snapshot of what is happening on Heroku.

app.get('/screenshot', async (req, res) => {
    try {
        // Open browser
        let browser = await puppeteer.launch({
            headless: true,
            args: [
                '--no-sandbox',
                '--disable-setuid-sandbox',
                '--disable-dev-shm-usage',
                '--single-process',
                '--use-fake-ui-for-media-stream',
                '--disable-audio-output'
            ],
        });
        console.log("opening login page");
        let page = await browser.newPage()
        await page.goto('https://accounts.google.com/signin/v2/identifier?flowName=GlifWebSignIn&flowEntry=ServiceLogin')
        console.log('logging in');
        // Login Start
        await page.type("input#identifierId", email, {
            delay: 0
        })
        await page.click("div#identifierNext")
        await page.waitFor(7000)
        console.log('entering password')
        await page.type("input.whsOnd.zHQkBf", password, {
            delay: 0
        })
        await page.click("div#passwordNext")
        await page.waitFor(5000)
        // await page.goto(url)
        await page.screenshot().then(function (buffer) {
            res.setHeader('Content-Disposition', 'attachment;filename="' + url + '.png"');
            res.setHeader('Content-Type', 'image/png');
            console.log(buffer);
            res.send(buffer);
        });
        // await browser.close();
    } catch (err) {
        res.send('Err ')
        console.log(err)
    }
});

main_problem_on_heroku

As its a new IP we need to again set one time OTP. So we need to add a function init to run and it for deployment on Heroku.

How do you enter the meeting in the same instance of browser in which meet was joined?

Suppose I am sleeping and my friend calls me to inform that the host is taking verbal attendance (through the mic). How do I actually enter the meeting to answer attendance? I don't want to open a new chrome window because the host will get a notification that I joined the meeting just before attendance. I want to enter in the same instance of browser in which your application is running.
Nice program by the way, thanks!

Attendance and Goodbye messages

Adding attendance and goodbye messages for this code, is a proper manner to at least say Hi๐Ÿ‘‹๐Ÿฝ and goodbye๐Ÿ‘‹๐Ÿฝ in the chat while you're not even getting into classes ๐Ÿคฃ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ.

Just after the chromium gets into the call...

        console.log("Successfully joined/Sent join request")

        await this.page.waitForTimeout(4000)
        console.log("\nWriting attendance message....")
        await this.page.click("span.DPvwYc.sm8sCf.KdraA")

        //Attendance message
        await this.page.waitForTimeout(4000)
        await this.page.focus("textarea.KHxj8b.tL9Q4c")
        console.log("\nWriting message...")
        await this.page.keyboard.type("your attendance message", {
            delay: 0
        })

        await this.page.waitForTimeout(500)
        await this.page.click("span.DPvwYc.e3AdI")
        console.log("\nMessage sent!")

1

And in the same block as the call ends....

async end() {
    //Goodbye message


    await this.page.focus("textarea.KHxj8b.tL9Q4c")
    console.log("\nSaying Goodbye...")

    await this.page.keyboard.type("your goodbye message", {
        delay: 0
    })

    await this.page.waitForTimeout(500)
    await this.page.click("span.DPvwYc.e3AdI")
    console.log("\nAll done!")
    await this.page.waitForTimeout(2000)
    await this.browser.close();
}

2

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.