-
Content Count
603 -
Joined
-
Last visited
-
Days Won
52
Posts posted by deliter
-
-
Ubot has not changed since then
I suggest YouTube "Automation League Ubot studio" that got me started, short video series but it is excellent
- 2
-
the target="_blank" is the problem, it opens the link in a new window, either scrape the href and navigate to there, or change the target value to nothing, with "change attribute"
- 1
-
Hi Deliter, "dont think" sounds not like there is any actual proof. Thanks for sharing your guess anyway
At the moment I am also not sure if the UI HTML Panel could in any means be influenced by CEF or not...
The UI HTML Panel is not run on CEF it is the same browser since Ubot 4
-
Extra question: can CEF Browser settings influence UI HTML Panel?
Any insight is welcome. Thanks.
No idea about the other things, but I dont think the UI HTML Panel uses CEF
-
I found a strange solution: Try to put all JavaScript / jQuery directly below the closing </body> tag.
This has resolved allmost all JavaScipt related issues in UI HTML Panel for me.
yes Jquery should always be put at the end
also other jquery plugins, after the jquery, as the jquery needs to be loaded before the plugins can work
-
Do I need an extra plugin to run that?
No just the URL decodeI think, which is in the ubot socket commands, or Ayman has a http text encode function if you do not have the socket commands
- 1
-
also this if you want to use ubot selector tools on the http data
- 1
-
-
sorry for the tone of that, I can see what you mean
-
Sorry Im not looking to make a clone or real alternative to Exbrowser, I probably will not make any more adds to this, I just needed it
-
heres another example
plugin command("DeliterCSS.dll", "In New Browser Chrome", "") { plugin command("DeliterCSS.dll", "Navigate Chrome", "http://www.google.com/") plugin command("DeliterCSS.dll", "Chrome Wait For Element", "#lst-ib", 10) plugin command("DeliterCSS.dll", "Type Chrome", "#lst-ib", "ubot studio") plugin command("DeliterCSS.dll", "Click Chrome", "[value=\"Search\"]") plugin command("DeliterCSS.dll", "Chrome Wait For Element", "#foot", 10) alert($plugin function("DeliterCSS.dll", "Deliter CSS Selector", $plugin function("DeliterCSS.dll", "Chrome Page Source"), ".r a", "TextContent")) wait(20) }
-
yeah, though it doesn't have even close to the features that plugin offers, I just needed to use a chrome browser for a project, and made the commands that I would need to accomplish that
Run Javascript
Type Text
Switch Frame
Click
Wait For Element
I new Browser
Navigate
Eval
Page Source
- 1
-
yes ok thank you for the tip, i will do, but this is no answer to my question :-)
why isnt there just a "restart script" command? is hard to create such Thing?
I'd suggest to read the forum, this question pops up from a newbie about every month, the reason it has been requested so much, and has never been implemented is because far better solutions already exist
-
Hey
Its pretty basic, I designed for my own use, will keep you posted if I add anything else or fix the things that do not work
https://1drv.ms/u/s!AgO9AudYbciJheoHbEYsVRJrOkmn0w
You will need to download the chromedriver.exe from
https://chromedriver.storage.googleapis.com/index.html
and store it in C:\Program Files (x86)\UBot Studio 5
plugin command("DeliterCSS.dll", "In New Browser Chrome", "") { plugin command("DeliterCSS.dll", "Navigate Chrome", "http://www.google.com/") plugin command("DeliterCSS.dll", "Chrome Wait For Element", "#lst-ib", 10) plugin command("DeliterCSS.dll", "Type Chrome", "#lst-ib", "Hello From Deliter!") wait(20) }
- 5
-
you can do this with the commands features ubot provides built in
-
I havnt checked the site but heres a few things, I have checked the picture you uploaded
set(#var0,$scrape attribute(<innertext=92>,"value"),"Global")
this code is actually looking for an attribute called value, and not actually looking for the innertext inside the tag
the code for this is <span>92</span>
for the above code to work, the html would need to be <span value="SpanValue">92</span>
the result of your above would be "SpanValue" as that is the value of the value attribute of the element that has an innertext of 92
your code above needs to be
set(#var0,$scrape attribute(<innertext=92>,"innertext"),"Global")
This code will only scrape if the innertext is 92, or any element with an innertext on 92, so it needs a better selector
this should work, ubot can be pretty difficult if the elements are setup not very good, so for this it might be difficult with ubot
In the code, I selected the id of the parent, 2 rows above the 92 value and used some functions to remove the whitespace, for this type of stuff like how you were using the devtools if you right click on the blue area, you can "copy element"(CSS) or "copy xpath" to that exact element, me and Dan both have free plugin for this, heres an example of simply using that right click in the web inspector and getting a path to the element, of course the plugins make this easier,ive changed the html slightly below but should work for your page too
load html("<div id=\"total_contacts\"> <p class=\"stat\"> <span>92</span> </p> </div>") alert($trim($strip tags($scrape attribute(<id="total_contacts">,"outerhtml")))) define $CSS Selector(#CSS Path, #Attribute To Scrape) { return($eval("document.querySelector(\"{#CSS Path}\").{#Attribute To Scrape}")) } alert($CSS Selector("#total_contacts > .stat >span", "innerText"))
-
if you want to make apps like ubot that have a web browser built in and you drive the web browser from outside of it, like Ubot, then C#, Ubot is also built on C# I think
C# over Python, to elaborate on HelloInsomnias answer, the intellisense added by Visual Studio, is absolutely amazing, really really incredible
I cannot code in C# but I built a Ubot plugin for it which is available to anyone here, the intellisense just guided me through, it tells me instantaneously why code will not work, and tells me what properties an object has, was an amazing experience, but it does look incredibly difficult,I still have no idea how it even works, I just put some code into the execute part of the template script provided by Ubot
I would recommend JS to anybody, simply because its easy, hardest thing I find when starting a language is just setting up the development environment, with JS you click developer tools and console, and you can begin in 2 minutes
-
Had two jobs on both, it just gives me an error, including adding a photo to a business on google maps,
any solutions? Chrome 21 is no good as google limit its features on google maps so I have to use 49, have tried a few user agents too
thanks
-
thank alot
it is amazing
and i have a question , is there anyway to add a row ? and if there are many rows , it will show current row ?
thank
Nice ideas will add these features later today and also a way to dynamically insert a full html table from your Ubot Table too
It appears Ubot has blocked me from starting threads in the free bots/plugins thread, so I am awaiting the outcome as to why this is
- 1
-
Heres a full replica, I have been meaning to make some UI Table commands for the community, I guess I might make a start on it, on this you can select the row, give it a color and a message, just like the UI above, and the delete button works too
ui html panel("<!DOCTYPE html> <html lang=\"en\"> <head> <title>Bootstrap Example</title> <meta charset=\"utf-8\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"> <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script> <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script> <style> #tHeader\{ color:white; background-color:#003366; \} .table td\{ border: black solid 1px !important; \} #tBody\{ color:white; background-color:#6699ff; \} .deleteR\{ background-color:red; \} </style> </head> <body> <input type=\"hidden\" id=\"invElem\" variable=\"#varThree\" onChange=\'evalUI()\' /> <div id=\"yourDiv\"></div> <script> function evalUI()\{ ubot.runScript(\'set(#UIOutput,\"\'+encodeURIComponent(eval(document.querySelector(\"#invElem\").value).toString())+\'\",\"Global\")\') \} </script> <div class=\"container\"> <h2>Bordered Table</h2> <p>The .table-bordered class adds borders to a table:</p> <table class=\"table table-bordered\"> <thead id=\"tHeader\"> <tr> <th>Job ID</th> <th>Campaign Name</th> <th>Date Added</th> <th>Next Run</th> <th>\'# URL\'s</th> <th>Campaign Status</th> <th></th> </tr> </thead> <tbody id=\"tBody\"> <tr> <td>7442</td> <td>Home Page</td> <td>11/04/2015</td> <td>11/04/2015</td> <td>1</td> <td>Submitting: Sending to Cloud</td> <td class=\"deleteR\" onClick=\"remove(this)\" >DELETE</td> </tr> <tr> <td>7442</td> <td>Home Page</td> <td>11/04/2015</td> <td>11/04/2015</td> <td>1</td> <td>Waiting: Drip Schedule</td> <td class=\"deleteR\" onClick=\"remove(this)\" >DELETE</td> </tr> <tr> <td>7442</td> <td>Home Page</td> <td>11/04/2015</td> <td>11/04/2015</td> <td>1</td> <td>Finished: Drip Schedule</td> <td class=\"deleteR\" onClick=\"remove(this)\" >DELETE</td> </tr> </tbody> </table> </div> <script> function remove(elem)\{ $(elem.parentElement).remove() \} </script> </body> </html> ",300) define changeCampaignStatus(#row, #color, #Message) { set(#item,$add(#row,1),"Local") return($evalUI("$(\"#tBody > tr:nth-child({#item}) > td:nth-child(6)\")[0].textContent = \"{#Message}\" $(\"#tBody > tr:nth-child({#item}) > td:nth-child(6)\")[0].style.backgroundColor = \"{#color}\" ")) } define $evalUI(#input) { set(#varThree,#input,"Global") wait(0.5) set(#varThree,"","Global") } wait(10) changeCampaignStatus(0, "green", "Submitting") wait(15) changeCampaignStatus(1, "orange", "Waiting") wait(10) changeCampaignStatus(2, "red", "Completed")
- 6
-
making a bot to have access to your money... as someone who's made 100's of bots, I think this is a very bad idea
-
Wow! So, it worked, and quickly! For the purposes of what I am trying to do, it is a much better solution than my own initial channel scraping method (Which was bulky, convoluted, and did not work on large channels!). I have to edit a bit of this to get it to work within my script, but that is trivial and easy. This replaces my clunky solution with a far better one. I have added slightly edited code below that gets the href as opposed to the titles, for anyone who may need that also.
usersVideos("https://www.youtube.com/user/YaleCourses/videos") define usersVideos(#videoPage) { set(#get,$plugin function("HTTP post.dll", "$http get", #videoPage, "", "", "", ""),"Local") add list to list(%titles,$plugin function("DeliterCSS.dll", "Deliter CSS Selector", #get, ".yt-lockup-title .yt-uix-sessionlink", "href"),"Don\'t Delete","Global") if($plugin function("DeliterCSS.dll", "Deliter CSS Selector Exists", #get, ".yt-uix-load-more")) { then { moreUserVideos("https://www.youtube.com{$plugin function("DeliterCSS.dll", "Deliter CSS Selector", #get, ".yt-uix-load-more", "data-uix-load-more-href")}") } else { } } } define moreUserVideos(#url) { set(#get,$plugin function("HTTP post.dll", "$http get", #url, "", "", "", ""),"Local") set(#removeEncoding,$eval("var re = {#get} re.content_html"),"Local") add list to list(%titles,$plugin function("DeliterCSS.dll", "Deliter CSS Selector", #removeEncoding, ".yt-lockup-title .yt-uix-sessionlink", "href"),"Delete","Global") set(#next,$replace regular expression($find regular expression(#get,"browse_ajax\\?.+?\""),"\\\\\"$",""),"Local") if($comparison(#next,">",$nothing)) { then { moreUserVideos("https://www.youtube.com/{$eval("var re = \"{#next}\" re")}") } else { } } }
So, for posterity, I am going to attempt to break down what is happening here.
- usersVideos "videoPage" is the parameter variable of the define "usersVideos", allowing me to define the page. (can probably add a variable to this for UI input of a page)
- define usersVideos first sets the get function to the videoPage variable, then it adds the css selector attribute chosen to the list. (I altered my list name and selected href)
- Next, the if statement checks if the gotten page info has a "load more" css selector, and if it does, it goes to the YouTube URL along with the css selected attribute for the actual "load more".
- The define; "moreUserVideos" is used to (This is where I get lost! lol! I'm not sure what happens here or how it is related to the first define.)
So far, I somewhat get what is going on and I know it works, so big thanks to you Deliter! I am just trying to wrap my mind around the rest, so as to better understand what is being done, to expand my own knowledge and skill. While the problem is indeed resolved by this, I also want to understand how that was achieved, so that I can work around similar problems in the future, without needing help. Hopefully this will also help others who are trying to create similar bots!
Thanks man, very flattered you really appreciate it and are trying to learn from it, I like helping people, kind of sucks when someone just copy pastas your work, doesn't "like" the post, nor tries to learn from it
the second part "moreUserVideos" is basically like if you were doing it manually, it hits the load more button, scrapes the titles, then the last thing is it checks if the load more button is present, if so, it keeps calling itself "moreUserVideos" to do that process again until the button is there no longer,if not present do nothing
if you want to start learning CSS Selectors, which I would really recommend, I have a plugin for Chrome to help you write selectors automatically
- 2
-
use the script I posted above that , it doesn't use his parser, not as good but its still fine, but change the code to not delete duplicates in the titles list, I forgot to do that
- 1
-
I am thoroughly confused and overwhelmed at this point, lol! Deliter you are great! But I am still quite far away from your skill and understanding. I need some time to try and understand this all, but I know it will help me in trying to finish this bot. Thank you!
Just run the code above, and check the titles list in your debugger, no need to understand it really
when you loaded you'l see an input for whatever youtube channel you want to scrape, it has yale loaded in there now
Ubot Video Tutorials Are Frustrating
in General Discussion
Posted
here is the playlist url
https://www.youtube.com/playlist?list=PLBS2_VJs2CPZSWZdQLMKbtx2Yd9P5sfxX