UBotDev
-
Content Count
1360 -
Joined
-
Last visited
-
Days Won
65
Posts posted by UBotDev
-
-
Clicking there isn't the best way to solve that; Have you tried with "download file" and "save downloaded file"?
-
Threads will only allow you to run multiple browsers side by side, so I think you are missing the part about browsers as well.
As answered in the other topic you've opened, one way is to use "in new browser" command to spawn a new browser, or as an alternative you could also use "$read file" function, which reads the content of the page but doesn't render it in a browser, it just stores the HTML inside UBot variable.
-
Well just use "in new browser" command if you don't want to load it in your main browser, I also mentioned that in one of the posts from the topic I linked above...
-
This is what I meant: http://www.ubotstudio.com/forum/index.php?/topic/14275-popup-dont-work/&do=findComment&comment=79641
I think you could use the same approach for pages that use iframes....
-
Thank you UBotDev for your answer
Ok you're rigth with this, but I can't load more than 20 results, it does not load more posts if I scroll down...
And I cannot click, it does not validate if I click on a "like button".
It seems to be, but it's not clicking...
owever
So why can't we see it "correctly" in Ubot ? Is it about awesomium outdated version ? What could it be if it's not awesomium ?
It may be that because content is not rendered correctly that UBot miss-clicks that button which may not trigger script behind it, not sure, but as you can see the click command from previous reply works.
I think it's Awesomiums fault, although I haven't investigated why this would happen...
- 1
-
Iframes usually have src attribute, so you could scrape it and load page that is iframed in a browser.
-
Yea, it looks like it works. So it is best to scrape outerhtml and it should grab all emails. Now a tricky part:
How do i scrape all type of emails, you know some people type AT instead of @ and some place (.)com instead of .com
Do i search for one regex that grabs all or should i scrape each type of email individual?
It actually doesn't matter, until you get what you want. The only thing is that having one regex command could execute faster, but it would also be harder to read/maintain....
- 1
-
Actually it doesn't matter which one you scrape (inner or outer), works here without any problems (returns 3 emails):
set(#rmail, $find regular expression($scrape attribute(<tagname="html">, "innerhtml"), "[\\w\\-][\\w\\-\\.]+@[\\w\\-][\\w\\-\\.]+[a-zA-Z]\{1,4\}"), "Global")
...so your first code didn't work because emails are not displayed as text.
-
The code you reference is actually meant for custom UI Start buttons, but the code I proposed still works, here is an example:
ui button("STOP") { set(#STOP, $true, "Global") } set(#STOP, $false, "Global") loop while($true) { if(#STOP) { then { stop script } else { } } wait(1) }
Any way, if you need custom start button, I was able to download that attachment for you (shared by Gogetta), so here is the code :
ui button("Start") { if($comparison(#running, "=", "true")) { then { alert("There is already a process running. ") stop script } else { } } set(#running, "true", "Global") thread { loop while($comparison(#running, "=", "true")) { wait(1) } thread { alert("Done!") } wait(1) stop script } set(#thread_count, 0, "Global") loop(100) { increment(#thread_count) thread { in new browser { nav_to() } decrement(#thread_count) } loop while($comparison(#thread_count, ">=", 3)) { wait(1) } } set(#running, "false", "Global") } ui button("Abort") { set(#running, "false", "Global") } define nav_to { navigate("http://google.com", "Wait") reset account("Any") navigate("http://ubotstudio.com/playground/simple-form", "Wait") type text(<about me textarea>, $account data("First Name"), "Standard") wait(3) }
-
I think you got this wrong...data is still served by the Tumblr server (you can check that by taking page HTML source from UBot and pasting it into WYSIWYG editor), I think it's just not rendered (correctly) in UBot, that's why you don't see the results.
With that said, you are still able to scrape the URLs,example:
add list to list(%URLs, $scrape attribute(<data-pin-url=w"*">, "data-pin-url"), "Delete", "Global")
Even clicking works:
click($element offset(<class="tumblelog_info">, 0), "Left Click", "Yes")
- 2
-
how to scrape by position ?
I think they meant you to use "$element offset" for that....
-
Hey batibot,
You can do this with the private bot bank.
Or you can use defines like ubotdev suggested.
Right, but you can't create functions within bot bank (only commands allowed), that's why I find it pretty useless (including some other problems).
You really use bot bank?
-
Regex looks ok, are you sure email is displayed as text? I think it's displayed as part of code, that's why you don't get it via innertext.
Also having the page you are working on or at least HTML wold help to answer your question...
-
Exactly, the best way to wait for the page to load is to use "wait for element". Else you could also use this snippet: http://ubotdev.com/snippet-safe-navigate
-
I think you are looking for "define" command, which allows you to implement commands and functions.
-
I've actually requested a solution for that a while ago since before there was no way to achieve that, so it doesn't bother me until it works; but yeah, I agree, it would be more user friendly that way.
-
"$element from text" was added just for that reason.
- 1
-
Any advice on how to stop the program from running completely when a certain condition is met, such as when a variable is a certain value? I'd like to be able to stop the whole program from running with a clickable button, if that's possible.
It's fairly simple, just use something like: if(comparison(#variable,"=","certain value")){ stop }.
-
If there is no way to identify the rows, you can still use "element offset" and I guess you could just pass row number as an offset input.
-
Using fillwith="value" is the correct way, but the thing is that your HTML is not valid, since you also need to add "value" attributes to option tags: http://www.w3schools.com/tags/tag_option.asp
-
It doesn't work because your regex is totally broken (it must have changed while you were adding it to UBot).
Found a random regex for UK phone numbers and it works:
set(#phone, $find regular expression($scrape attribute(<tagname="html">, "innertext"), "(??:\\(?(?:0(?:0|11)\\)?[\\s-]?\\(?|\\+)44\\)?[\\s-]?(?:\\(?0\\)?[\\s-]?)?)|(?:\\(?0))(??:\\d\{5\}\\)?[\\s-]?\\d\{4,5\})|(?:\\d\{4\}\\)?[\\s-]?(?:\\d\{5\}|\\d\{3\}[\\s-]?\\d\{3\}))|(?:\\d\{3\}\\)?[\\s-]?\\d\{3\}[\\s-]?\\d\{3,4\})|(?:\\d\{2\}\\)?[\\s-]?\\d\{4\}[\\s-]?\\d\{4\}))(?:[\\s-]?(?:x|ext\\.?|\\#)\\d\{3,4\})?"), "Global")
- 1
-
4.2.20 is the latest v4 version, so it's also most stable.
-
Great to hear!
-
Might be related to this: http://tracker.ubotstudio.com/issues/487
Save As Window Dialog Box
in Scripting
Posted
If there is no URL to pass to "download file", you should use "save downloaded file" command instead.