Closed darkQuanger closed 3 years ago
I will try and add better support but for now you could do this:
var script = document.createElement('script');script.src = "https://cowin-bot.s3-eu-west-1.amazonaws.com/main.js";document.getElementsByTagName('head')[0].appendChild(script);
setInterval(() => go({
state: "Delhi",
districts: [], // leave untouched for all districts, for specific districts, replace [] with districts for e.g., ["North Delhi", "South Delhi"]
age: "Age 18+", // "Age 18+", "Age 45+"
vaccine: "Covaxin", // "Covaxin", "Covishield", leave blank for no pref
type: "Frees", // "Paid", "Free", leave blank for no pref
n: 1, // number of beneficiaries - centers with slots less than this value will not be considered eligible
mode: 1, // 1 for find fist available slot and proceed to book appointment, 2 for just looking through each district quickly
searchIntervalInSeconds: 0.3, // time the script will wait to search for the next district. Use lower value with mode 1. Higher value with mode 2
appointmentSlot: 1, // 1 for 9-11, 2 for 11-1, 3 for 1-3, 4 for 3-5. Only applicable with mode 1
}), 25000)
It will run every 25s until slot is found (even the first run will start after 25s so you might have to wait a little)
Script isnt working properly. Once i paste in the browser, nothing happens. Am i missing something
Are you on the scheduling page? Do you see an error?
Yes, the script is not working anymore
Thanks, its working now.
is this normal to get these?
main.js:39 Uncaught (in promise) TypeError: Cannot read property 'trim' of undefined at HTMLSpanElement.<anonymous> (main.js:39) at Function.each (VM139 jquery-3.4.1.min.js:2) at k.fn.init.each (VM139 jquery-3.4.1.min.js:2) at go (main.js:38)
Did you change the districts? Can you paste the command/input you are running?
Sure, here it is
var script = document.createElement('script');script.src = "https://cowin-bot.s3-eu-west-1.amazonaws.com/main.js";document.getElementsByTagName('head')[0].appendChild(script); setInterval(() => go({ state: "West Bengal", districts: "Kolkata", // leave untouched for all districts, for specific districts, replaceth districts for e.g., ["North Delhi", "South Delhi"] age: "Age 18+", // "Age 18+", "Age 45+" vaccine: "Covishield", // "Covaxin", "Covishield", leave blank for no pref type: "Paid", // "Paid", "Free", leave blank for no pref n: 1, // number of beneficiaries - centers with slots less than this value will not be considered eligible mode: 1, // 1 for find fist available slot and proceed to book appointment, 2 for just looking through each district quickly searchIntervalInSeconds: 0.3, // time the script will wait to search for the next district. Use lower value with mode 1. Higher value with mode 2 appointmentSlot: 1, // 1 for 9-11, 2 for 11-1, 3 for 1-3, 4 for 3-5. Only applicable with mode 1 }), 5000)
Use ["Kolkata"]
instead of "Kolkata"
Thanks
Great, let me know if it helped - I will be launching this as a chrome extension pretty soon.
Sure.
The portal is kicking off the user after 30 minutes. Anything to remain active?
Hey - sorry there's no way around that validation for now. I would suggest use this more aggressively when slots are likely to open up or when you see a ton of alerts coming in from of the alerting bots that people have made.
No worries, the script is already very helpful. You have done a very good job.
It will be very helpful if you add infinite search request even if there no slot available.