You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CodeForces - Contest Notifier: This tool first logs in to your CodeForces id and then registers to all the contests available at the moment for you.
2
+
// It also scrapes the already registered and upcoming contests' data and notifies you of the dates and time of all contests through a text via Whatsapp Web.
3
+
// Tech-Stacks : JavaScript, HTML, CSS, puppeteer
4
+
5
+
constpup=require("puppeteer");
6
+
letfs=require('fs');
7
+
letemail="";//type in your email and password to use automatic contest notifier
8
+
letpassword="";
9
+
leturl="https://codeforces.com/";
10
+
asyncfunctionmain(){
11
+
letbrowser=awaitpup.launch({// opens the browser
12
+
headless: false,
13
+
defaultViewport: false,
14
+
args: ["--start-maximized"]// fullscreen
15
+
});
16
+
letpages=awaitbrowser.pages();// browser ke andar opened tabs ko ek array mien leke aana
17
+
tab=pages[0];
18
+
awaittab.goto(url);
19
+
awaittab.waitForSelector(".menu-list.main-menu-list",{visible:true});// wait for a css selector to load on page
20
+
letlist=awaittab.$$(".menu-list.main-menu-list li a");
21
+
letcontest=list[2];
22
+
letcontestUrl=awaittab.evaluate(function(ele){
23
+
returnele.getAttribute("href");
24
+
},contest);
25
+
awaittab.goto("https://codeforces.com"+contestUrl);// goes to codeforces main site
0 commit comments