Jump to content
UBot Underground

Varo

Fellow UBotter
  • Content Count

    111
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Varo

  1. Hey I just quickly ran it through x path pro...  is it possible for you to show me how I would isolate each of those?

    e.g. if  just want the 136 (Visits) or just the 295 (Page views), or just 106 (search visits) etc.

    https://www.screencast.com/t/zdV3g2RXD 

     

    any additional help would be appreciated.

    Thanks!

    Chris

     

    Yes you can isolate each of those. 

    You can achieve it with 2 ways: 

     

    1. based on sequence 

    results no 1
    (//td[@class='stat_label']/h3[contains(text(),'VISITS')]/../../td[2])[1]
    
    results no 2
    (//td[@class='stat_label']/h3[contains(text(),'VISITS')]/../../td[2])[2]
    
    results no 3
    (//td[@class='stat_label']/h3[contains(text(),'VISITS')]/../../td[2])[3]
    

    2. based on h3 text --> //td[@class=chart]/h3 as starting point and then you continue the xpath to the destination element

    http://i.imgur.com/3HsaAul.png

  2. Hi, for this kind of page, the easiest way is using xpath parser.

    You can use Free Xpath Plugin by Dan. 

    http://network.ubotstudio.com/forum/index.php/topic/19449-free-xpath-plugin/

     

    here the code: 

    navigate("http://bazoogle3.com/testscrape2/","Wait")
    set(#var1,$plugin function("XpathPlugin.dll", "$Generic Xpath Parser", $document text, "//td[@class=\'stat_label\']/h3[contains(text(),\'VISITS\')]/../../td[2]", "innertext", ""),"Global")
    alert(#var1)
    
    

    and here are the results: 

    http://i.imgur.com/gjWkIua.png

     

    Hope it helps. 

  3. How can I click on Youtube like(below video, not from comment)

     

    Currently, I use Click by coordinate but it's not very good(different size, browser...)

     

    Not sure why I am not available to click it, perhaps youtube use some java/script to block/hide - no sure

    <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-button-has-icon no-icon-markup like-button-renderer-like-button like-button-renderer-like-button-unclicked  yt-uix-post-anchor yt-uix-tooltip" type="button" onclick=";return false;" aria-label="like this video along with 16,215 other people" title="I like this" data-post-data="itct=CDwQpUEiEwiFt9n-_KTUAhVb5hwKHVtTBqwo-B0&se=8pH38AERCAASDQoLTzN5ZGJJVW8wRVk%3D" data-force-position="true" data-position="bottomright" data-orientation="vertical" data-post-action="/service_ajax" data-tooltip-text="I like this" aria-labelledby="yt-uix-tooltip1124-arialabel">
    <span class="yt-uix-button-content">16,215</span></button>
    

    I've tried to click by class, title, type - without any success

     

    Any idea how this can be clicked?

     

    it should be simple,

    plugin command("ExBrowser.dll", "ExBrowser Click", "//button[@title=\'I like this\']")
    
    
    • Like 1
  4. @uBotForMe

    Try this code :

    ui open file("browse",#uiopen csv)
    ui stat monitor("Loop counter",#row)
    ui text box("Link",#websitelink)
    create table from file(#uiopen csv,&csvtable)
    set(#row,0,"Global")
    clear list(%row)
    loop($table total rows(&csvtable)) {
        add item to list(%row,#row,"Don\'t Delete","Global")
        increment(#row)
    }
    thread spawn($table total rows(&csvtable),5) {
        Go($next list item(%row))
        wait(1)
    }
    define Go(#rowtable) {
        in new browser {
            allow images("No")
            navigate(#websitelink,"Wait")
            wait for browser event("Everything Loaded",10)
            wait for element(<email field>,10,"Appear")
            type text(<email field>,$table cell(&csvtable,#rowtable,0),"Standard")
            type text(<password field>,$table cell(&csvtable,#rowtable,1),"Standard")
            click(<login button>,"Left Click","No")
        }
    }
    
    

    report the results here. 

  5. Hi Varo, the code worked for stopping the loop, thanks again.

     

    Yes, but I am not sure how to make the three conditions.  Can you show me an example to add the third condition of not containing captcha page?

     

    Also, is there a way that if either one of the 3 conditions are true (1. not contain link text  2. less than or equal your maximum loop set 3. not containing captcha  page) then I stop the script code and immediately restart it from the beginning?  What I have now is that it stops the loop set but proceeds with the rest of the script code actions.

     

     

    PS: I'm not sure if the captcha page url may change.  Maybe it's better to make the variable that it contains the captcha page text "Type the characters you see in this image:"

     

    This is loop while with three condition: 

    set(#countloop,0,"Global")
    loop while($both($both($not($exists(<innertext="THE LINK TEXT IS INSERTED HERE">)),$not($exists(<innertext="Captcha Page">))),$comparison(#countloop,"<= Less than or equal to",#put_your_maximum_loop_here))) {
        wait for browser event("Everything Loaded","")
        wait(1)
        then {
            run javascript("window.scrollTo(0,document.body.scrollHeight); ")
            focus(<id="pagnNextString">)
            mouse over(<id="pagnNextString">,"No")
            click(<id="pagnNextString">,"Left Click","No")
            wait for browser event("Everything Loaded","")
            wait(1)
            wait($rand(1,4))
            focus(<title="THE LINK TEXT IS INSERTED HERE">)
            mouse over(<data-attribute="THE LINK TEXT IS INSERTED HERE">,"No")
            click(<data-attribute="THE LINK TEXT IS INSERTED HERE">,"Left Click","No")
        }
        increment(#countloop)
    }
    
    

    And about restart it from beginning i am not sure. 

    But you can try it. Use define command. 

    • Like 1
  6. Hi Varo, thanks I'm going to try this now.

     

    One more thing I encountered is that there is sometimes a captcha page that comes on.  Is there any tips to restart the ubot code if I encounter a captcha page during this loop?  Maybe a code that says if the page is the-captcha-page-url.com then stop script and start entire ubot script from the beginning?

     

    do you mean you have three "condition to wait for" : 

    1. not contain link text

    2. less than or equal your maximum loop set

    3. not containing captcha  page.

     

    If so, it can be done. 

    Just change one of your condition to "both" and then put your another two condition. 

    • Like 1
  7. You can set variable to count your loop before loopwhile begin.

    Then use 'both' function in loopwhile, and then put increment in the end of loopwhile.

    See code below 

    set(#countloop,0,"Global")
    loop while($both($not($exists(<innertext="THE LINK TEXT IS INSERTED HERE">)),$comparison(#countloop,"<= Less than or equal to",#put_your_maximum_loop_here))) {
        wait for browser event("Everything Loaded","")
        wait(1)
        then {
            run javascript("window.scrollTo(0,document.body.scrollHeight); ")
            focus(<id="pagnNextString">)
            mouse over(<id="pagnNextString">,"No")
            click(<id="pagnNextString">,"Left Click","No")
            wait for browser event("Everything Loaded","")
            wait(1)
            wait($rand(1,4))
            focus(<title="THE LINK TEXT IS INSERTED HERE">)
            mouse over(<data-attribute="THE LINK TEXT IS INSERTED HERE">,"No")
            click(<data-attribute="THE LINK TEXT IS INSERTED HERE">,"Left Click","No")
        }
        increment(#countloop)
    }
    
    
    • Like 3
×
×
  • Create New...