Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My attempt at automating the entire operation ;) #44

Closed
bombardier-gif opened this issue May 5, 2021 · 54 comments
Closed

My attempt at automating the entire operation ;) #44

bombardier-gif opened this issue May 5, 2021 · 54 comments

Comments

@bombardier-gif
Copy link

My main painpoint was that

  1. I had to enter the OTP whenever the token expired
  2. I had to manually choose the slot
  3. The frequency of polling was not enough to book slots

**Hence I automated the entire thing end-to-end ;) **

Please share your thoughts on it.

Code and steps to install are here. https://github.com/bombardier-gif/covid-vaccine-booking
Its hacky and dirty. Pull requests are welcome ;)

@pallupz
Copy link
Owner

pallupz commented May 5, 2021

Hey - That looks cool. A little too much setting up for lay person but I dont see much of a workaround either.

Unfortunately, it doesn't matter. Requests are now getting blocked

@bombardier-gif
Copy link
Author

Oh no. Please let me know if you find any workaround on it.

@pallupz
Copy link
Owner

pallupz commented May 5, 2021

Sure thing

@botmon99
Copy link

botmon99 commented May 5, 2021

It seems to be working now right?
It would be amazing if you updated your version @bombardier-gif

@bombardier-gif
Copy link
Author

I already did @botmon99 Let me know if you need any help setting it up

@botmon99
Copy link

botmon99 commented May 5, 2021

hey that's super cool!
I was just wondering if it was possible to set a specific slot time as the first preference with auto-booking on
e.g. 1.3 as the first preference

@pallupz
Copy link
Owner

pallupz commented May 5, 2021

@botmon99 all you need to do is edit this line:

choice = '1.1'

@pallupz
Copy link
Owner

pallupz commented May 5, 2021

Although, if a third slot is not available, you might have to do exception handling for that.

EDIT: You won't have to. It's already handled. But, it might take you on a loop.

@bombardier-gif
Copy link
Author

I used a randomizer to select a slot. This helped in a much better success rate

@devansh7777
Copy link

@bombardier-gif I tried your way of automating the sms gig it just didn't work out for me. The first applet i made showed error with the message rate limited by remote server : 'extendclass link' . Then i made two other applets with new extendclass links and they just dont catch the recieved message. i followed you method step to step exactly. Help me out man.

@bombardier-gif
Copy link
Author

One way to get around it is. Create an account with extendclass site (its free) and then create a new link. Let me know if it helps

@bombardier-gif
Copy link
Author

Also @devansh7777 Could you share your extendsclass link? It could happen that your ISP could be rate limited by them if they used the same IP address.

@urajeya
Copy link

urajeya commented May 6, 2021

@bombardier-gif Hi I have the same issue as devansh7777, tried a new url after login also...... No luck

@bombardier-gif
Copy link
Author

@urajeya Can you please share your extendclass link?

@urajeya
Copy link

urajeya commented May 6, 2021

@lets-get-vaccinated
Copy link

I used a randomizer to select a slot. This helped in a much better success rate

What is an improved success rate compared to the base version?

@bombardier-gif
Copy link
Author

Anecdotal: It usually instantly books a slot. And also on the next try it user another available random combination.

@urajeya
Copy link

urajeya commented May 6, 2021

@bombardier-gif Is the .exe file on your page with the random version?

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

I'm closing this ticket to cleanup my issues list. Feel free to continue your discussion here though.

@pallupz pallupz closed this as completed May 6, 2021
@bombardier-gif
Copy link
Author

@urajeya It is working for me. Did you try the premium version of IFTTT?

@urajeya
Copy link

urajeya commented May 6, 2021

@bombardier-gif Yeah, have taken the 7day Pro trial of IFTTT. I am not sure what's the issue here. Thanks for your help.

@devansh7777
Copy link

@bombardier-gif https://json.extendsclass.com/bin/d2b36ae31841 this is the link i created, i also borrowed a premium account of ifttt from a friend. i will try to make an account on extendclass as you suggested.

@bombardier-gif
Copy link
Author

@urajeya and @devansh7777 Let me update my solution without using the extendsclass solution. It still works for me so its a bit hard to debug.
Give me couple of hours!

@axd123
Copy link

axd123 commented May 6, 2021

@pallupz @bombardier-gif

I've been trying to cut out a lot of the options and make a personalized script.
programming wise, I'm probably 0 on a scale from 1-10.
I can understand the code and conditions.
Sadly, I cant seem to compile the code my windows laptop. extreme noob problems. I know.
My pc is not being able to pull requests, but i sorted that out.
now, though I think my pc is facing issue pulling modules from the utils file.
any help or comments will be appreciated.
Also, kudos to you guys, the code works well enough.

image

PS C:\Users\akhpp\Downloads\covid-vaccine-booking-main (1)\covid-vaccine-booking-main> python src\covid-vaccine-slot-booking.py
Traceback (most recent call last):
File "src\covid-vaccine-slot-booking.py", line 3, in
from utils import generate_token_OTP, get_beneficiaries, check_and_book, get_districts, get_pincodes, beep,
File "C:\Users\akhpp\Downloads\covid-vaccine-booking-main (1)\covid-vaccine-booking-main\src\utils.py", line 2, in
from inputimeout import inputimeout, TimeoutOccurred
ModuleNotFoundError: No module named 'inputimeout'

@iashishsethia
Copy link

Mine isn't probably working automatically because it asks me to manually enter OTP every 13-14 minutes.
My extends Class URL is working fine
https://json.extendsclass.com/bin/980ccb487106
So is IFTTT.
I have updated my mobile number and the extends class as described in the steps.
PS: I'm a coding noob.

@bombardier-gif
Copy link
Author

Give me couple of hours I shall try to address all the issues mentioned by asish sethia and axd. Overall i am trying to take away the extendsclassURL

@devansh7777
Copy link

@bombardier-gif my new applet is running fine now, like it shows applet ran everytime there's an otp in my inbox.
what I think the problem is with my code now. I did {Search for your__mobile__number and replace with your mobile number} this step in vs code saved it, replaced the extendclass link too. But when i run the exe file it still asks for the mobile number. so i guess i am doing something wrong here. this might be the final obstacle for me :D

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

@axd123 install the dependencies.

@axd123
Copy link

axd123 commented May 6, 2021

@axd123 install the dependencies.

already done. on pip-ing them again, get prompted

Requirement already satisfied: inputimeout in c:\users\akhpp\appdata\local\programs\python\python38\lib\site-packages (1.0.4)

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

Well its throwing ModuleNotFoundError. So clearly its not able to find the package.

@axd123
Copy link

axd123 commented May 6, 2021

@pallupz
yeah I know what you mean. I'm guessing youre not using windows to code, are you?

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

I am. In fact I pretty much only use Windows

@bombardier-gif
Copy link
Author

@devansh7777 you are supposed to use the script using the python command, and not the exe
@pallupz Can you tell me how to update the exe (i have not used windows in a while)

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

You just have to install pyinstaller and from the code folder run pyinstaller --onefile <your-code.py>

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

Even better would be offloading that activity to GitHub Actions, like I have using this yaml: https://github.com/pallupz/covid-vaccine-booking/blob/main/.github/workflows/main.yml

@devansh7777
Copy link

@bombardier-gif check @pallupz last update he added the feature to search for vaccines from today. see if you can automate that script too. Also your method worked for me! but it scans from a day after so that might slow down the process.

@axd123
Copy link

axd123 commented May 6, 2021

@pallupz

I am. In fact I pretty much only use Windows

What version of python are you using, if you don't mind my asking?
I think I should fresh install python and then try tinkering with it.

I actually used an older version of your script today (since I didn't want so many options to increase my human lag) and successfully booked my friends' vaccinations. Some coffee is coming your way.

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

@axd123 Python 3.9 but really anything 3.6+ is fine

@iashishsethia
Copy link

image
I ran the file but I haven't received any OTP.
And it is stuck at

OTP SMS len is:0
OTP SMS is:

@bombardier-gif
Copy link
Author

Hi All,

I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

@devansh7777
Copy link

Hi All,

I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@devansh7777
Copy link

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@devansh7777
Copy link

also all the codes works smooth, great minds you guys!

@bombardier-gif
Copy link
Author

@pallupz As people have reported that this code works, would you mind linking this up in your readme, so that more people could discover and benefit?

@bombardier-gif
Copy link
Author

@devansh7777 Did you use my code to book a slot?

@urajeya
Copy link

urajeya commented May 6, 2021

@bombardier-gif Great work with the IFFFT logic , now it works flawlessly. The .EXE makes it much easier to run on PC
@pallupz Your Playground was GREAT!! You helping + taking inputs from others to continuously improve it is also very commendable 👍
Will buy both a coffee/beer once I successfully register 🍻, had been trying today but no luck😅

The slots fill up very fast, can the time interval between checks be reduced below 5 seconds? Also as I was using pallupz's .EXE file, I think picking a random slot instead of 1.1 would be more successful. Will try the .EXE from bombardier tomorrow.

Also for both the .EXE once the slots are filled they don't reset to zero. Picture attached.
CoWin Run Error

@bombardier-gif
Copy link
Author

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

Yes I just refreshed from the main repo

@bombardier-gif
Copy link
Author

@bombardier-gif Great work with the IFFFT logic , now it works flawlessly. The .EXE makes it much easier to run on PC
@pallupz Your Playground was GREAT!! You helping + taking inputs from others to continuously improve it is also very commendable 👍
Will buy both a coffee/beer once I successfully register 🍻, had been trying today but no luck😅

The slots fill up very fast, can the time interval between checks be reduced below 5 seconds? Also as I was using pallupz's .EXE file, I think picking a random slot instead of 1.1 would be more successful. Will try the .EXE from bombardier tomorrow.

Also for both the .EXE once the slots are filled they don't reset to zero. Picture attached.
CoWin Run Error

@urajeya I allow even 1 sec refresh rate.

@bombardier-gif
Copy link
Author

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@urajeya I updated the code. Please let me know if worked for you

@devansh7777
Copy link

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@urajeya I updated the code. Please let me know if worked for you

the update worked smoothly i even got booked but then a cancellation message came soon after that. But atleast the script works alright. But since 1 am there is a problem with the OTPs , i am not recieving OTP after the token expires. The initial otp step works fine more often than not, but from the very first token renewal the code fails.

@pallupz
Copy link
Owner

pallupz commented May 6, 2021

@pallupz As people have reported that this code works, would you mind linking this up in your readme, so that more people could discover and benefit?

I have added this.

@devansh7777
Copy link

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@urajeya I updated the code. Please let me know if worked for you

the update worked smoothly i even got booked but then a cancellation message came soon after that. But atleast the script works alright. But since 1 am there is a problem with the OTPs , i am not recieving OTP after the token expires. The initial otp step works fine more often than not, but from the very first token renewal the code fails.

adding a feature to resend otp after 180 sec might solve the issue tho @bombardier-gif

@bombardier-gif
Copy link
Author

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@urajeya I updated the code. Please let me know if worked for you

the update worked smoothly i even got booked but then a cancellation message came soon after that. But atleast the script works alright. But since 1 am there is a problem with the OTPs , i am not recieving OTP after the token expires. The initial otp step works fine more often than not, but from the very first token renewal the code fails.

Hi Devansh,
If possible could you share your mobile number on this email: bombardier-jpg@protonmail.com
Then i can debug and help you. (the thing is me and all my friends got a slot so I dont have a number who wants to book a slot )

@bombardier-gif
Copy link
Author

Hi All,
I just updated the logic to make it much simpler. I removed the extendsclass and replaced with something more reliable. And also now you dont need to update the change the code.
Let me know how it works out.

does it scan for slots from the present day ?

@bombardier-gif kindly add the feature so that it can scan from the present day like @pallupz did. It is impossible here in bagalore to get a slot.

@urajeya I updated the code. Please let me know if worked for you

the update worked smoothly i even got booked but then a cancellation message came soon after that. But atleast the script works alright. But since 1 am there is a problem with the OTPs , i am not recieving OTP after the token expires. The initial otp step works fine more often than not, but from the very first token renewal the code fails.

adding a feature to resend otp after 180 sec might solve the issue tho @bombardier-gif

Aah let me try. Also could you please create an issue in my repo? There are multiple threads in this issue and i dont want to miss important inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants