Jump to content
UBot Underground

UBotDev

Fellow UBotter
  • Content Count

    1360
  • Joined

  • Last visited

  • Days Won

    65

Posts posted by UBotDev

  1. Right, thanks, there is no option to download file, only click on the link and it generates the file on the fly and opens the save as dialog box. It's a series of checkboxes that you select the options from and then click a button link to generate the file.

     

    Did I understand your question properly?

     

    If there is no URL to pass to "download file", you should use "save downloaded file" command instead.

  2. 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.

  3. 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...

    • Like 1
  4. 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....

    • Like 1
  5. 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)
    }
    
    
  6. 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")
    
    
    • Like 2
  7. 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?

  8. 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 }.

  9. 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")
    
    
    • Like 1
×
×
  • Create New...