bhavsarpratik / vaccine_availability

Get vaccine availability in India
25 stars 33 forks source link

Not able to fetch data in streamlit app #9

Open azeem110201 opened 3 years ago

azeem110201 commented 3 years ago

The program is unable to fetch the details of vaccines available in any district

bhavsarpratik commented 3 years ago

There is some issue with the API. It has stopped working. Is there any other API?

azeem110201 commented 3 years ago

https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=512&date=05-05-2021

I am creating a similar application using the same API and it's working fine. I just change the district_id and date based on my convenience

bhavsarpratik commented 3 years ago

The API works on my local but not on https://share.streamlit.io where the app is hosted

azeem110201 commented 3 years ago

Try hosting it on heroku platform.

aahnik commented 3 years ago

The API works on my local but not on https://share.streamlit.io where the app is hosted

i think streamlit does not allow connections to all sites. Same problem with python anywhere.

atulmits commented 3 years ago

Can this code made in such a way, that we input all the filters to script to run in loop (backend) and it gives a pop-up or whatsapp message as soon as the vaccine is available? I tried and I could fix my district code and age. But could not run script in loop and generate pop up.

aahnik commented 3 years ago

hi @atulmits, WhatsApp is hell. You may check out wappdriver, which no longer maintained. WhatsApp does not have a free official API.

Telegram, Discord etc has a free API, and great libraries like telethon and discord.py

and why you want a loop? it can be run using a cron job, at an interval set by you. run it every hour. if you run too much, the API server may ban your IP.

email is great, and simple.