Chainsaw 9 Posted September 19, 2017 Report Share Posted September 19, 2017 When trying to scrape some inner text that is padded with blank lines and blank characters. What it the best way to just get the actual text without all the blank characters and line feeds? Quote Link to post Share on other sites
Marani 80 Posted September 19, 2017 Report Share Posted September 19, 2017 Use $trim to remove white spaces from the result. When trying to scrape some inner text that is padded with blank lines and blank characters. What it the best way to just get the actual text without all the blank characters and line feeds? 1 Quote Link to post Share on other sites
Chainsaw 9 Posted September 21, 2017 Report Share Posted September 21, 2017 Use $trim to remove white spaces from the result. Thanks Marani. $trim takes care of the leading blanks. Still leaves in the trailing line feeds and blanks. So after applying $trim I took the first element of a $list from text delimited with the $new line. Kind of long winded but it works. I guess what I'm trying to find is the equivalent to the Ubot $scrape attribute "innertext" parameter. It automatically strips leading and trailing blanks and line feeds. Quote Link to post Share on other sites
Chainsaw 9 Posted September 21, 2017 Report Share Posted September 21, 2017 I need to use Change Attribute rather than Type Text however trying to change the attribute value, nothing happens. Type Text in the code below works but Change Attribute does not. plugin command("ExBrowser.dll", "ExBrowser Type Text", "x://input[contains(@name,\"name\")]", #newname) plugin command("ExBrowser.dll", "ExBrowser Change Attribute", "x://input[contains(@name,\"name\")]", "value", #newname) Is there an error in my code? Or perhaps the change the attribute value needs some special syntax to work. Any suggestions? Quote Link to post Share on other sites
Bot-Factory 602 Posted September 21, 2017 Report Share Posted September 21, 2017 I need to use Change Attribute rather than Type Text however trying to change the attribute value, nothing happens. Type Text in the code below works but Change Attribute does not. plugin command("ExBrowser.dll", "ExBrowser Type Text", "x://input[contains(@name,\"name\")]", #newname) plugin command("ExBrowser.dll", "ExBrowser Change Attribute", "x://input[contains(@name,\"name\")]", "value", #newname) Is there an error in my code? Or perhaps the change the attribute value needs some special syntax to work. Any suggestions? Can you define "Not work".. It probably changes the HTML code. Because that what it's supposed to do. But you will NOT see it in the browser because it doesn't reload the page. But I think you should test "Paste into element", that's probably what you need in such a scenario. Dan Quote Link to post Share on other sites
Chainsaw 9 Posted September 21, 2017 Report Share Posted September 21, 2017 Can you define "Not work".. It probably changes the HTML code. Because that what it's supposed to do. But you will NOT see it in the browser because it doesn't reload the page. But I think you should test "Paste into element", that's probably what you need in such a scenario. Dan I've since found that using ExBrowser Change Attribute works as expected for other form fields. I'm not sure why it doesn't work in this case. <input type="text" class="form-control bg-gray" name="name" id="modalFieldName" value="My Name" required=""> Sorry I do not know about "Paste into element". Is that a command available in a Ubot pluggin or XPath? Quote Link to post Share on other sites
Chainsaw 9 Posted September 22, 2017 Report Share Posted September 22, 2017 Can you define "Not work".. It probably changes the HTML code. Because that what it's supposed to do. But you will NOT see it in the browser because it doesn't reload the page. But I think you should test "Paste into element", that's probably what you need in such a scenario. Dan Yes you are right that the value is changing in the HTML source however when submitting the form it is the old default value that is still visible in the form field that gets submitted. The only situation where it is changing the form value field as desired is when there is no initial value in that field at page load time. Quote Link to post Share on other sites
Chainsaw 9 Posted September 22, 2017 Report Share Posted September 22, 2017 I've found I can use the ClearTextBox command followed by the Type Text command to get the correct text string into the form field. Quote Link to post Share on other sites
Bot-Factory 602 Posted September 22, 2017 Report Share Posted September 22, 2017 I've since found that using ExBrowser Change Attribute works as expected for other form fields. I'm not sure why it doesn't work in this case. <input type="text" class="form-control bg-gray" name="name" id="modalFieldName" value="My Name" required=""> Sorry I do not know about "Paste into element". Is that a command available in a Ubot pluggin or XPath? Sorry, the correct name of the command is:ExBrowser Overwrite Element with Clipboard Dan Quote Link to post Share on other sites
Macster (UBotter Labs) 112 Posted September 22, 2017 Report Share Posted September 22, 2017 Hey @Dan i just notied that eveytime i open the plugins windows in UBS, yours keeps popingup an update notice https://www.dropbox.com/s/nlr76eut1xqsdzy/UBot%20Studio_2017-09-22_16-01-47.png?dl=0Not sure if it was reported or its just me but hope it helps. Overall, excellent work Quote Link to post Share on other sites
Chainsaw 9 Posted September 22, 2017 Report Share Posted September 22, 2017 OK Xpath Builder Pro has made me lazy. Anyone know how to log into Twitter with this? At the moment it won't let me type anything into the password field when using XBP. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted September 22, 2017 Author Report Share Posted September 22, 2017 https://twitter.com/login?lang=en//input[@name="session[password]"] Quote Link to post Share on other sites
Chainsaw 9 Posted September 22, 2017 Report Share Posted September 22, 2017 https://twitter.com/login?lang=en//input[@name="session[password]"]Thanks Dan! Quote Link to post Share on other sites
Chainsaw 9 Posted September 22, 2017 Report Share Posted September 22, 2017 I've found I can use the ClearTextBox command followed by the Type Text command to get the correct text string into the form field. Sorry, the correct name of the command is:ExBrowser Overwrite Element with Clipboard Dan Also found that "ExBrowser Type Text2" does what I need and works really well. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted September 22, 2017 Author Report Share Posted September 22, 2017 Im not Dan buddy im TJ, Dan is my partner with Exbrowser along with Chris Quote Link to post Share on other sites
Chainsaw 9 Posted September 23, 2017 Report Share Posted September 23, 2017 Im not Dan buddy im TJ, Dan is my partner with Exbrowser along with ChrisOK Thanks TJ Quote Link to post Share on other sites
Chainsaw 9 Posted September 23, 2017 Report Share Posted September 23, 2017 Seems that everytime I launch Chrome using "ExBrowser Launcher" it resets some of the browser settings. For example: "Ask where to save each file before downloading" is set to "disabled". Is there any way to launch Chrome from ExBrowser without any settings being changed? 1 Quote Link to post Share on other sites
Marani 80 Posted September 23, 2017 Report Share Posted September 23, 2017 Load a profile when launching: Seems that everytime I launch Chrome using "ExBrowser Launcher" it resets some of the browser settings. For example: "Ask where to save each file before downloading" is set to "disabled". Is there any way to launch Chrome from ExBrowser without any settings being changed? 1 Quote Link to post Share on other sites
Chainsaw 9 Posted September 23, 2017 Report Share Posted September 23, 2017 Load a profile when launching: Thanks Marani. I had missed that video. Quote Link to post Share on other sites
JackCrow 4 Posted October 2, 2017 Report Share Posted October 2, 2017 I'm running Exbrowser on a simple bot that isn't multithreading. The bot runs for about 20 minutes then slows to a crawl. Then it will either stop on a website ( the chrome portable website isn't freezing ) then after sometime it will often give me a clr.dll error. I've tried the bot on multiple computers whose framework is up to date. Same issue keeps occurring.Hasn't been an issue with any of my Exbrowser bots until recently. What am I missing? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 2, 2017 Author Report Share Posted October 2, 2017 What is it doing exactly? WHat is the bot doing as far as code wise? scraping data, building a %list, or &table that will help determine things. also the clr error I believe is ubot, have you tried going up to options at the top clicking tools, then change browser version of ubot being used?it still loads a ubot browser for ui, and main browser inside ubots browser, and have to make sure your not building huge lists within ubot its better to dump it to a file and read from it as needed. Quote Link to post Share on other sites
JackCrow 4 Posted October 3, 2017 Report Share Posted October 3, 2017 Hi TJ, Thanks for getting back to me. It's a profile creation bot but there is some scrapping involved. also the clr error I believe is ubot, have you tried going up to options at the top clicking tools, then change browser version of ubot being used? Yea I've done that a few times, even switched them back and forth in the hopes it might reset something. I'm on 21. Also, I don't have this issue on my other non-exbrowser bots that I compiled a few weeks ago. Have to make sure your not building huge lists. Not the case, I even ran it in Ubot for a while then checked debugger to make sure. There are about a dozen lists and they all stay under 1000.And I'm not saying this is an Exbrowser issue I but I haven't added any new plugins or made any changes the last few weeks so I have so idea what it could be. I'm guessing that no one else is running into this issue? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 3, 2017 Author Report Share Posted October 3, 2017 its got to be one of the methods being used thats causing an issue for the CLR error that your getting for sure.Seems you had this issue back in December as well http://network.ubotstudio.com/forum/index.php/topic/20310-clrdll-error-or-stackoverflow-exception-errors/ This gave some ways that it could be fixedhttps://www.google.com/search?rlz=1C1ASUM_esUS744US744&q=ubotstudio+clr+error But over all I think that UbotStudio support would need your code to reproduce the error, and see if they can fix it I suggest adding on http://tracker.ubotstudio.com 1 Quote Link to post Share on other sites
JackCrow 4 Posted October 3, 2017 Report Share Posted October 3, 2017 TJ, I feel like I should Paypal you some cash for the awesome help. :-)Seems you had this issue back in December as well http://network.ubots...ception-errors Funny you should mention that, I actually bought Exbrowser because of that issue and I haven't seen the problem again ( until now ) This gave some ways that it could be fixedhttps://www.google.c...tudio clr error Yea I tried many of those things, but I'm an armature with a lot of this so much is lost on me. I believe Exbrowser is what solved the problem at the time. I am doing a few things in the ubot browser in this bot but the bot craches at random times and it has only crashed in Exbrowser. But over all I think that UbotStudio support would need your code to reproduce the error, and see if they can fix it I suggest adding on http://tracker.ubotstudio.com Thank you. I'll try a few more things then try that.As a side note, are you still selling the Fiverr Promoter Pro bot? Let me know if so and I'll shoot you an Email. Love to hear more about it. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 3, 2017 Author Report Share Posted October 3, 2017 My fiverr bot isnt available at the moment but a new version will be available soon. 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.