Joe118 3 Posted February 10, 2010 Report Share Posted February 10, 2010 Ubot allows you to wait for a page to finish loading, and then you can start searching the page safely. But some pages don't ever finish loading, and some pages take a VERY long time, especially through proxies. If you hit a dead proxy, it will sit there waiting for a very long timeout. This makes the bot seem dead or unresponsive to customers. The solution advised by some ubot experts is to search for something on the page and if that's present then you can go ahead, the page is loaded "enough". But the problem is that (at least in compiled bots) if the page has not yet STARTED to load, searching within the page gives an error (see http://ubotstudio.com/forum/index.php?/topic/2762-ubotcore-uscript-x5d98ae8c1573a5c-error/ ). Can we please have this error disabled if the bot is in the process of loading a page? Instead just make the search return false like usual. Quote Link to post Share on other sites
hannahmcintyre 2 Posted February 10, 2010 Report Share Posted February 10, 2010 Ubot allows you to wait for a page to finish loading, and then you can start searching the page safely. But some pages don't ever finish loading, and some pages take a VERY long time, especially through proxies. If you hit a dead proxy, it will sit there waiting for a very long timeout. This makes the bot seem dead or unresponsive to customers. The solution advised by some ubot experts is to search for something on the page and if that's present then you can go ahead, the page is loaded "enough". But the problem is that (at least in compiled bots) if the page has not yet STARTED to load, searching within the page gives an error (see http://ubotstudio.com/forum/index.php?/topic/2762-ubotcore-uscript-x5d98ae8c1573a5c-error/ ). Can we please have this error disabled if the bot is in the process of loading a page? Instead just make the search return false like usual.The problem is you're using the wrong command. Rather than searching for soemthing on the page, use the "wait for" command. Then, the bot won't continue until what you're searching for has loaded. Quote Link to post Share on other sites
Joe118 3 Posted February 11, 2010 Author Report Share Posted February 11, 2010 The problem is you're using the wrong command. Rather than searching for soemthing on the page, use the "wait for" command. Then, the bot won't continue until what you're searching for has loaded. This is not very good because it means that a dead proxy will block the entire bot. Also you can't wait for multiple things like perhaps the proxy failed or the page loaded successfully... Quote Link to post Share on other sites
hannahmcintyre 2 Posted February 11, 2010 Report Share Posted February 11, 2010 This is not very good because it means that a dead proxy will block the entire bot. Also you can't wait for multiple things like perhaps the proxy failed or the page loaded successfully...Then do an if command. If command, delay for 30 seconds or however long you want before you figure your proxy is dead, then search for the text you want. If it's there, continue, if not, have it start again. Quote Link to post Share on other sites
sonneti 0 Posted February 11, 2010 Report Share Posted February 11, 2010 Then do an if command. If command, delay for 30 seconds or however long you want before you figure your proxy is dead, then search for the text you want. If it's there, continue, if not, have it start again. This just makes the bot slow & slightly less likely to have errors.. but there will still be errors. Quote Link to post Share on other sites
Joe118 3 Posted February 11, 2010 Author Report Share Posted February 11, 2010 Then do an if command. If command, delay for 30 seconds or however long you want before you figure your proxy is dead, then search for the text you want. If it's there, continue, if not, have it start again. Hanna, there will still be an error from the search command if the page has not yet been received at all. See, the problem is that 'search' throws an error rather than returning false when you search on a page thats not instantiated enough to be searchable (as would be the case if the proxy is dead or very very very slow). The only solution I see is to have ubot return false if it is in such a state rather than throw an error. With that behavior you can safely do a search, if it returns false then just go do something else, and come back later to try again. Quote Link to post Share on other sites
Seth Turin 223 Posted February 12, 2010 Report Share Posted February 12, 2010 I think that joe's suggestion will solve the issue. I will include this in the next update Quote Link to post Share on other sites
sonneti 0 Posted February 12, 2010 Report Share Posted February 12, 2010 I think that joe's suggestion will solve the issue. I will include this in the next update Seth, You are a legend! Thanks Quote Link to post Share on other sites
Joe118 3 Posted February 12, 2010 Author Report Share Posted February 12, 2010 I think that joe's suggestion will solve the issue. I will include this in the next update Thanks Seth -- can you give Sonneti and me an indication when the next update will happen? We have a bot that we cannot market at present because of this issue... Thanks! Quote Link to post Share on other sites
sonneti 0 Posted February 15, 2010 Report Share Posted February 15, 2010 Thanks Seth -- can you give Sonneti and me an indication when the next update will happen? We have a bot that we cannot market at present because of this issue... Thanks! It was partially fixed today but is still giving errors in compiled bots. I already emailed support with a link to a bot i am getting the error with. Quote Link to post Share on other sites
Joe118 3 Posted February 15, 2010 Author Report Share Posted February 15, 2010 It is now also fixed in compiled bots. THANKS TO SETH for the hard work on fixing this problem. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.