Comments (18)
I will be taking a look soon at this
from us-visa-appointment-notifier.
@theoomoregbee you can fix it just add to checkForSchedules:
await page.setExtraHTTPHeaders({
'Accept': 'application/json, text/javascript, */*; q=0.01',
'X-Requested-With': 'XMLHttpRequest'
});
await page.goto(APPOINTMENTS_JSON_URL);
from us-visa-appointment-notifier.
I was able to replicate this with the help of a friend. I should be able to send a fix for this later this week.
from us-visa-appointment-notifier.
@theoomoregbee you can fix it just add to checkForSchedules:
await page.setExtraHTTPHeaders({ 'Accept': 'application/json, text/javascript, */*; q=0.01', 'X-Requested-With': 'XMLHttpRequest' }); await page.goto(APPOINTMENTS_JSON_URL);
Works like a charm!
from us-visa-appointment-notifier.
It looks like the page with the json of the dates has been removed on the US website, I am getting the same error.
We need to find where this page has been moved to.
from us-visa-appointment-notifier.
I will be taking a look soon at this
I manually set the version information like this:
Windows x64:
node.js > 18.15.0
puppeteer > 19.8.5 (Because I am encountering an error while installing the 16.2.0 version embedded in the files "package.json".
I am getting a different error from the link below. When I do all the steps, I get the mailgun key error ("key" is required).
https://github.com/mueedqadri/US-visa-appointment-notifier
I get an error even though I typed the mailgun domain and the password starting with "key-".
Again I manually set the versions like this:
node.js > 18.15.0
puppeteer > 19.8.5
(I'm getting the same key error on version 16.2.0 of puppeteer.)
from us-visa-appointment-notifier.
I am facing the same issue. Here is the stack trace
Unable to parse page JSON content <html><head></head><body></body></html>
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at checkForSchedules (/home/vigu/git/US-visa-appointment-notifier/index.js:53:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async process (/home/vigu/git/US-visa-appointment-notifier/index.js:85:24)
at async process (/home/vigu/git/US-visa-appointment-notifier/index.js:92:3)
at async /home/vigu/git/US-visa-appointment-notifier/index.js:100:5
from us-visa-appointment-notifier.
I am having the same issue. It'll be great if this can be resolved soon. Appreciate the work!
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at checkForSchedules (C:\Users\olvr\US-visa-appointment-notifier\index.js:52:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async process (C:\Users\olvr\US-visa-appointment-notifier\index.js:84:24)
at async process (C:\Users\olvr\US-visa-appointment-notifier\index.js:91:3)
at async C:\Users\olvr\US-visa-appointment-notifier\index.js:99:5
from us-visa-appointment-notifier.
Has anyone found any solution ?
from us-visa-appointment-notifier.
It looks like the page with the json of the dates has been removed on the US website, I am getting the same error. We need to find where this page has been moved to.
I looked at the site, the json link remains, but it does not work. So they did not put it in a new link. I needed this script urgently, but I could not find a solution.
from us-visa-appointment-notifier.
Excited for the fix @theoomoregbee !
from us-visa-appointment-notifier.
I get is this error now:
> root@ubuntu-22:~/US-visa# npm start
> [email protected] start
> node index.js
>
> =====>>> Step: starting process with 1000 tries left
> =====>>> Step: logging in
> =====>>> Step: checking for schedules
>
> Unable to parse page JSON content <html><head></head><body></body></html>
> SyntaxError: Unexpected end of JSON input
> at JSON.parse (<anonymous>)
> at checkForSchedules (/root/US-visa/index.js:52:30)
> at processTicksAndRejections (internal/process/task_queues.js:97:5)
> at async process (/root/US-visa/index.js:84:24)
> at async /root/US-visa/index.js:98:7
> =====>>> Step: starting process with 999 tries left
> =====>>> Step: logging in
> =====>>> Step: checking for schedules
>
> Unable to parse page JSON content <html><head></head><body></body></html>
> SyntaxError: Unexpected end of JSON input
> at JSON.parse (<anonymous>)
> at checkForSchedules (/root/US-visa/index.js:52:30)
> at processTicksAndRejections (internal/process/task_queues.js:97:5)
> at async process (/root/US-visa/index.js:84:24)
> at async process (/root/US-visa/index.js:91:3)
> at async /root/US-visa/index.js:98:7
>
> ^Z
> [1]+ Stopped npm start
> root@ubuntu-22:~/US-visa# bg
>
> [1]+ npm start &
> root@ubuntu-22:~/US-visa# =====>>> Step: starting process with 998 tries left
>
> =====>>> Step: logging in
> =====>>> Step: checking for schedules
>
> Unable to parse page JSON content <html><hea`
from us-visa-appointment-notifier.
@theoomoregbee Any chance a fix is imminent?
from us-visa-appointment-notifier.
@ficusun can you send a PR with this changes and I will approve and merge it in. Thanks.
from us-visa-appointment-notifier.
@ficusun can you send a PR with this changes and I will approve and merge it in. Thanks.
Also, can you add two dates, eairliest date and latest date, to search for dates? For example, to send notifications between 2023-05-01 and 2023-07-01.
from us-visa-appointment-notifier.
@ficusun can you send a PR with this changes and I will approve and merge it in. Thanks.
Yes, I can, within a couple of days
from us-visa-appointment-notifier.
already merged in. Thanks @ficusun for the suggestion.
from us-visa-appointment-notifier.
@theoomoregbee you can fix it just add to checkForSchedules:
await page.setExtraHTTPHeaders({ 'Accept': 'application/json, text/javascript, */*; q=0.01', 'X-Requested-With': 'XMLHttpRequest' }); await page.goto(APPOINTMENTS_JSON_URL);
works like magic. thanks @ficusun! and it works for the python version as well. uxDaniel/visa_rescheduler#31 (comment)
from us-visa-appointment-notifier.
Related Issues (20)
- npm start with an error HOT 3
- After 100 or so api calls, api start sending empty list HOT 12
- Error: Parameter "key" is required HOT 1
- The API link doesn't work anymore HOT 2
- proxy settings HOT 1
- Email should only be sent once HOT 1
- TypeError: Cannot read properties of null (reading '$') HOT 1
- Can it be used without previously scheduled date? HOT 1
- Error when sending email HOT 1
- TimeoutError HOT 1
- Failed to parse dates, probably because you are not logged in HOT 1
- Update to new portal HOT 1
- 1 Us visa appountment
- [] HOT 1
- Error: Parameter "key" is required HOT 1
- TimeoutError: Navigation timeout of 30000 ms exceeded HOT 1
- Email not sending
- NEXT_SCHEDULE_POLL and multiple query cities
- Wrong open dates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from us-visa-appointment-notifier.