daydos / us-visa-appointment

A puppeteer script to find and schedule an earlier interview for visas
GNU General Public License v2.0
80 stars 52 forks source link

Webpage not found after sign in. API link changed? #8

Open spykedboy opened 1 year ago

spykedboy commented 1 year ago

I am getting the following error.

"This ais.usvisa-info.com page can’t be found No webpage was found for the web address: https://ais.usvisa-info.com/en-ca/niv/schedule/xxxxxxxx/appointment/days/89.json?appointments[expedite]=false HTTP ERROR 404 "

How do we update the link and fix the issue?

Msoffice12314 commented 1 year ago

YES i get the same issue now

karancodes commented 1 year ago

I just made a new pull request #10 to fix this issue.

Msoffice12314 commented 1 year ago

you are awesome ty

On Mon, Jun 26, 2023 at 11:51 PM Karan Pathania @.***> wrote:

I just made a new pull request #10 https://github.com/daydos/us-visa-appointment/pull/10 to fix this issue.

— Reply to this email directly, view it on GitHub https://github.com/daydos/us-visa-appointment/issues/8#issuecomment-1608749733, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA2VDDJWV26EOU6DTHICV4DXNJKELANCNFSM6AAAAAAZPVGHFM . You are receiving this because you commented.Message ID: @.***>

alexchenwd commented 1 year ago

hi I got the same issue but still cannot fix by the change. It shows "the group you are trying to access does not exist"

devopsgituser commented 1 year ago

Hi, Thanks for the above solution. However I am not able to reschedule my appointment. Script execution says it is scheduled but I didn't received any email neither it is showing on the portal. It seems it is not scheduling the appointment.

Could you please share your experience or if you have any fix for this issue ?

image
devopsgituser commented 1 year ago

I could see the issue is reported on March 20 but not sure as I can see your latest comments and looks like you were able to run it successfully.

Really appreciate your efforts and response.

lucasnm92 commented 1 year ago

@devopsgituser did you find out why you were having this issue? Cheers

beyondlifei commented 1 year ago

I got the same issue. I think U.S. VISA website did some measures to prevent data of json from being read directly. So I add some code into usappointment.js , between line 229 and line 230. Then it works.

const targetPage = page;
await page.setExtraHTTPHeaders({
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'X-Requested-With': 'XMLHttpRequest'
});
 const response = await targetPage.goto('https://ais.usvisa-info.com/en-' + region + '/niv/schedule/' + appointmentId + '/appointment/days/' + consularId + '.json?appointments[expedite]=false');

This code snippet is used to set additional HTTP headers in a Puppeteer page request. Two headers are set:

Accept: This defines the type of content the client expects to receive. In this instance, it's expecting a JSON, JavaScript, or any other type of response, but it gives a higher priority to JSON and JavaScript. X-Requested-With: This is a non-standard HTTP request header that is typically sent by JavaScript frameworks to identify Ajax requests. Most JavaScript frameworks send this field with its value set to 'XMLHttpRequest'.

KaranmaanCanada commented 1 year ago

I got the same issue. I think U.S. VISA website did some measures to prevent data of json from being read directly. So I add some code into usappointment.js , between line 229 and line 230. Then it works.

const targetPage = page;
await page.setExtraHTTPHeaders({
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'X-Requested-With': 'XMLHttpRequest'
});
 const response = await targetPage.goto('https://ais.usvisa-info.com/en-' + region + '/niv/schedule/' + appointmentId + '/appointment/days/' + consularId + '.json?appointments[expedite]=false');

This code snippet is used to set additional HTTP headers in a Puppeteer page request. Two headers are set:

Accept: This defines the type of content the client expects to receive. In this instance, it's expecting a JSON, JavaScript, or any other type of response, but it gives a higher priority to JSON and JavaScript. X-Requested-With: This is a non-standard HTTP request header that is typically sent by JavaScript frameworks to identify Ajax requests. Most JavaScript frameworks send this field with its value set to 'XMLHttpRequest'.

Hi , thanks for updating . Btw can we use this script with Amazon AWS for lil business purposes, if yes please respond we can collab and work on it

yachaoxiong commented 1 year ago

hi I got the same issue but still cannot fix by the change. It shows "the group you are trying to access does not exist"

same issue, any solution to fix this?

Bulgug89 commented 9 months ago

I got the same issue. I think U.S. VISA website did some measures to prevent data of json from being read directly. So I add some code into usappointment.js , between line 229 and line 230. Then it works.

const targetPage = page;
await page.setExtraHTTPHeaders({
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'X-Requested-With': 'XMLHttpRequest'
});
 const response = await targetPage.goto('https://ais.usvisa-info.com/en-' + region + '/niv/schedule/' + appointmentId + '/appointment/days/' + consularId + '.json?appointments[expedite]=false');

This code snippet is used to set additional HTTP headers in a Puppeteer page request. Two headers are set:

Accept: This defines the type of content the client expects to receive. In this instance, it's expecting a JSON, JavaScript, or any other type of response, but it gives a higher priority to JSON and JavaScript. X-Requested-With: This is a non-standard HTTP request header that is typically sent by JavaScript frameworks to identify Ajax requests. Most JavaScript frameworks send this field with its value set to 'XMLHttpRequest'.

Thanks