GithubHelp home page GithubHelp logo

us-visa-bot's Introduction

Hello community! 👋

I'm a senior software engineer interested in topics like distributed systems, complex event processing, software architecture and design, infrastructure, operation, and more. I love to analyze complex problems to conceive efficient and coherent solutions.

GitHub Stats

us-visa-bot's People

Contributors

jeangnc avatar kaganatalay avatar vicdup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

us-visa-bot's Issues

checkAvailableDate

function checkAvailableDate return Error: You need to sign in or sign up before continuing.

function checkAvailableDate(headers) { let yatriSession = headers["_yatri_session"] let tokenSession = headers["X-CSRF-Token"] return fetch('${BASE_URI}/schedule/${SCHEDULE_ID}/appointment/days/${FACILITY_ID}.json?appointments[expedite]=false', { "headers": Object.assign({}, { 'Cookie': yatriSession, 'X-CSRF-Token': tokenSession, "Referer": 'https://ais.usvisa-info.com/es-mx/niv', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', 'Cache-Control': 'no-store', 'Connection': 'keep-alive' }, { "Accept": "application/json", "X-Requested-With": "XMLHttpRequest", }), "cache": "no-store" }) .then(r => r.json()) .then(r => handleErrors(r)) .then(d => d.length > 0 ? d[0]['date'] : null) }

Date range

How can I make it search and assign the appointment (if available) within a date range?

Cookies null

function parseCookies(cookies) not received datas, return null

No dates available

I believe I'm being banned from making requests to the available dates endpoint, it's always returning "no dates available" in any region, does anyone knows if I need to reduce the requests interval to avoid this kind of issue?

Final booking step failing and returning html? Need additional headers?

Hi everyone and thanks for all your work on this project.

The program is working for me up to the final booking step where I am getting an error: [Errno Expecting value] <!DOCTYPE html> followed by html for the login page.

Does anyone know if the required headers have changed? Do we need X-Requested-With like the date calls?

Thanks!

Login Error

Updated the base URI to en-ca and passed all the necessary variables but I am getting "Error: You need to sign in or sign up before continuing."

Everything is setup as usual, any thoughts on what could be causing this?

doubt

does this work still? i need to have already a booked date to use it right? is it true that when u book a date, u get restricted on viewing dates on certain times?

Where do I put the exports?

I already have all the gathered information, I just need to find where do I put the login info and whatnot to get the code running properly, it's literally the only thing I'm missing

current booked date: undefined

Hi everyone, I am trying to book a date for a friend, who already have a booked date in 2025.
But, when I run it, it shows Error that the currentBookedDate is undefiend, does any body have any idea how it works?
Username and password, I have given them in String ,Schedule and Facility in numbers.

Scheduling Group Appointments

How can I improve this code to book a group appoinment?

Unlike individual appointments, the group appointment has one additional step.
In case of a group appointment, after you click 'Reschedule Appointment' it takes you to a page where you select the members of the group for whom you want to reschedule. Normally you want to put checkboxes for all the persons on that list. And then you click 'Continue' at the bottom.
Afterward, it takes you to the page where you select the consular section, date, and time, so this step and the following steps are already the same both for individuals and groups.

ECONNREFUSED error

The program worked one time but the next time it ran got the following error: ECONNREFUSED

FetchError: request to https://ais.usvisa-info.com/en-ca/niv/users/sign_in failed, reason: connect ECONNREFUSED 18.254.10.38:443

type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  erroredSysCall: 'connect'

Any ideas here?

Rescheduling fails.

When an available date is found, I receive the notification through Pushover. But the automatic rescheduling always fails, with the following error message:

"Reschedule Failed!!! 2024-04-19 10:00
reason:

<script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"9edb043da4","applicationID":"1729965","transactionName":"eldYFkBWDlhWQBcWBlFdUhdeUAxTHFNIFQpQVkIPV1cWG1pcSxEXTFtCC11XEQ==","queueTime":0,"applicationTime":301,"agent":""}</script> <script type="text/javascript">(window.NREUM||(NREUM={})).init={ajax:{deny_list:["bam.nr-data.net"]}};(window.NREUM||(NREUM={})).loader_config={licenseKey:"9edb043da4",applicationID:"1729965"};;/*! For license information please see nr-loader-rum-1.252.0.min.js.LICENSE.txt */ (()=>{var e,t,r={234:(e,t,r)=>{"use strict";r.d(t,{P_:()=>v,Mt:()=>b,C5:()=>s,DL:()=>w,OP:()=>S,lF:()=>T,Yu:()=>x,Dg:()=>m,CX:()=>c,GE:()=>_,sU:()=>R});var n=r(8632),i=r(9567);const o={beacon:n.ce.beacon,errorBeacon:n.ce.errorBeacon,lice"

Seems that doesn't work anymore

I've tested this for a few days. A few times is said "rescheduled", but I didn't get any confirmation - the data of my appointment on the website is still the same

NEED HELP

hi first time i will use github anyone can help me pleaseeee

Schedulle only CSRA ?

Hello,
Does the script only schedule the interview for the consulate (CSRA)? And the casv will it also schedule?

I ran here and scheduled for SP , however only the CSRA schedule, is this a problem?

thansk

"You need to sign in or sign up before continuing" or "socket hang up"

Whenever I try to run the bot I get either of the following errors. Is this expected or should it be able to login on the first few attempts?

[2023-03-07T14:45:29.397Z] Logging in
Error: You need to sign in or sign up before continuing.
    at handleErrors (file:///home/lucas/hdd/Downloads/us-visa-bot/index.js:107:11)
    at file:///home/lucas/hdd/Downloads/us-visa-bot/index.js:85:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (file:///home/lucas/hdd/Downloads/us-visa-bot/index.js:25:20)
[2023-03-07T14:52:43.321Z] Logging in
FetchError: request to https://ais.usvisa-info.com/pt-br/niv/schedule/?????/appointment/days/??.json?appointments[expedite]=false failed, reason: socket hang up
    at ClientRequest.<anonymous> (file:///home/lucas/hdd/Downloads/us-visa-bot/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:512:28)
    at TLSSocket.socketOnEnd (node:_http_client:520:9)
    at TLSSocket.emit (node:events:524:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  erroredSysCall: undefined
}

ASC Appointment

Thanks a lot for your work!

Some places, like Sao Paulo needs the ASC Appointment but looks like the POST request ignores this parameter breaking for some regions.

  return fetch(url, {
    "method": "POST",
    "redirect": "follow",
    "headers": Object.assign({}, newHeaders, {
      'Content-Type': 'application/x-www-form-urlencoded',
    }),
    "body": new URLSearchParams({
      'utf8': '✓',
      'authenticity_token': newHeaders['X-CSRF-Token'],
      'confirmed_limit_message': '1',
      'use_consulate_appointment_capacity': 'true',
      'appointments[consulate_appointment][facility_id]': FACILITY_ID,
      'appointments[consulate_appointment][date]': date,
      'appointments[consulate_appointment][time]': time,
      'appointments[asc_appointment][facility_id]': '',
      'appointments[asc_appointment][date]': '',
      'appointments[asc_appointment][time]': ''
    }),
  })

Do you have plans to add this feature?

Blocked all available dates.

I had quite a few dates that were available in August and September, but when I started constantly updating the site the dates disappeared and now I see only this message "No existen citas disponibles en la ubicación seleccionada. Por favor vuelva a intentar después". Could they block me during my elevated activity? And is there any way to protect the script from blocking?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.