Jump to content
UBot Underground

How would you deal with an unreliable internet connection in ubot?


Recommended Posts

Hello guys,

 

couple of  newbie question... Say in case of  a bad internet connection- if the connection closes  while a bot is processing/running -

 

-- how do I check  if the  internet connection is active or not ?

 

Also would it be an overkill to try and  adjust the 'speed' of the bot based on the internet bandwidth of the user? - change the 'wait' and 'timeout' settings using variable values? -  I could  either let the user decide the' wait time' range or have the bot check some free online 'internet speed checker' sites and depending on the values returned set the 'wait/timeout' variables..?

 

Thanks.

Link to post
Share on other sites

I overcome the different people connection speed issues by using the 'wait for element' instead of just using 'wait', if people are timing out with 1 'wait for element' in place add a second 'wait for element' as ubot will move past the command if taking to long :)

Link to post
Share on other sites

Add a second 'wait for element' ..? sounds interesting.. so if the first wait for element times out , the same command is repeated again ..below? Or Is it  wait for some other element on page or same element..?

 

Could I have some sample code please?

 

Thanks.

Link to post
Share on other sites

You can set the timeout in the advanced settings with a wait for element.  So no need for the second wait for element.  Personally I wouldn't use a wait for element, and instead let the user set their timeout settings.

Link to post
Share on other sites

Thanks for the opinions!

Personally I wouldn't use a wait for element, and instead let the user set their timeout settings.

 

I agree.. this seems to be the best way to deal with a lot of issues while structuring your bot..

for example-

 

Retries on failed captcha.. let the user decide the no. of retries..

Random waits between web page navigation - this could be set by the user too.

Link to post
Share on other sites
  • 1 year later...

Wait for element is best and in an loop while even better.

 

You can use disappear too.

 

i.e. wait for button to disappear then wait for an ?? element to appear.

 

Put a variable or function in the timeout field. That will get from defaults from file or the UI (so user can set).

 

CD

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...