I would like to use a puppeeter to create a bot that will check if there is an active internet connection (sometimes it breaks it and I have to reset the router), so if the connection failed, the bot would automatically log into my router panel and reset it (this is not is a problem, but I do not know how to catch the lack of internet with a puppeter)
Thank you very much for any help and idea!
#update
guys, i know how to use puppetter, and implement this thing, BUT i dont know what should i put into condition, to check connection, for example i have
some loop lets say
for (let i = 0; i < 20000; i++) {
if(NOCONNECTION){then do something}
await delay(randomInteger(18000, 48000));
}
I just dont know, how to check if i have connection ;/ - so the problem is NOCONNECTION ;/
question from:
https://stackoverflow.com/questions/65917840/puppeeter-catch-no-connection-error-and-do-some-action 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…