No dates available
matheusliraofficial opened this issue · 6 comments
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?
Same here. I am also being thrown the same issue. No Available Dates. Any help is greatly appreciated.
Yeah, it's a ban. Will be unbanned in 3-4 hours. I wrote a Puppeteer solution for same purpose. The safe request frequency is 2 minutes.
Yeah, it's a ban. Will be unbanned in 3-4 hours. I wrote a Puppeteer solution for same purpose. The safe request frequency is 2 minutes.
How to add it to the bot?
Yeah, it's a ban. Will be unbanned in 3-4 hours. I wrote a Puppeteer solution for same purpose. The safe request frequency is 2 minutes.
How to add it to the bot?
Just write a bash that executes it and sleep, something like:
nano loop.sh
Paste this on the file
#!/bin/sh
while true
do
./index.js
sleep 300
done
Save and give permission, chmod+x loop.sh
, after that run the script, ./loop.sh
and it will execute the us-visa-bot
every 5 minutes
@prabello hello can you contanct with me please
So just use the following sleep() function instead which calls the function every 2 - 5 minutes randomly:
// sleeps randomly from 2 to 5 minutes
function sleep() {
const randomDelay = Math.floor(Math.random() * (300 - 120 + 1) + 120); // Generate random number between 120 and 300 (2 to 5 minutes)
return new Promise((resolve) => {
setTimeout(resolve, randomDelay * 1000); // Convert seconds to milliseconds
});
}