seedlit / vfs-visa-slot-germany

MIT License
21 stars 4 forks source link

Did you got any appointment using this bot? #1

Closed manishtiwari25 closed 2 years ago

seedlit commented 2 years ago

Yep I did. To make it work as of today, you will have to make some small changes as VFS has added a few more locations.

manishtiwari25 commented 2 years ago

Cool, Instead of using x-path, use their API :smile: I have already made some changes and deployed it in azure.

  jwt = driver.execute_script("return sessionStorage.getItem('JWT');")
  # select from drop down
  my_headers = {'Authorization' : jwt}
  tempstartDate = datetime.datetime.now()+ timedelta(days=1)
  tempendDate = tempstartDate+timedelta(days=91)
  startDate = tempstartDate.strftime("%d/%m/%Y")
  endDate = tempendDate.strftime("%d/%m/%Y")
  response = requests.get("https://lift-api.vfsglobal.com/appointment/slots?countryCode=ind&missionCode=deu&centerCode=DEL&loginUser=<registered email>&visaCategoryCode=Skilled Worker More than 90 days&languageCode=en-US&applicantsCount=1&days=91&fromDate="+startDate+"&slotType=2&toDate="+endDate, headers=my_headers)

// Update the email in the URL this will make this independent of any UI changes. Hope it will help. Cheers

seedlit commented 2 years ago

This is brilliant! Didn't knew they have an API. How did you manage to find it? Also, do you mind making a pull request?

arun171188 commented 2 years ago

Cool, Instead of using x-path, use their API 😄 I have already made some changes and deployed it in azure.

  jwt = driver.execute_script("return sessionStorage.getItem('JWT');")
  # select from drop down
  my_headers = {'Authorization' : jwt}
  tempstartDate = datetime.datetime.now()+ timedelta(days=1)
  tempendDate = tempstartDate+timedelta(days=91)
  startDate = tempstartDate.strftime("%d/%m/%Y")
  endDate = tempendDate.strftime("%d/%m/%Y")
  response = requests.get("https://lift-api.vfsglobal.com/appointment/slots?countryCode=ind&missionCode=deu&centerCode=DEL&loginUser=<registered email>&visaCategoryCode=Skilled Worker More than 90 days&languageCode=en-US&applicantsCount=1&days=91&fromDate="+startDate+"&slotType=2&toDate="+endDate, headers=my_headers)

// Update the email in the URL this will make this independent of any UI changes. Hope it will help. Cheers

Hi Manish,

Could you please help me in getting this fixed? I am getting errors

manishtiwari25 commented 2 years ago

@seedlit by using debugger mode in crome I am able to get the API information.

@arun171188 VFS Delhi now supports a waiting list, please book your slot and they will notify you whenever a slot will be available.

I will raise a PR shortly, bit busy nowadays. HAppy coding, Cheers

nullf6 commented 1 month ago

@manishtiwari25 Do you still have the complete bot? and if you do, can you upload it into a repo?