Jump to content
UBot Underground

Bill

Fellow UBotter
  • Content Count

    39
  • Joined

  • Last visited

Posts posted by Bill

  1. I have a script that uses a SQlite DB.  Data is retrieved DB to fill a dynamically filled dropdown menu and few other UI's.

     
    Everything works fine. But when the program isn't used for a few hours the script freezes and any data shown the in a UI and dropdown menu disappears.
    How can this be prevented?
  2. This worked for me 

     

     run()
    define run {
        navigate("http://www.the-saleroom.com/en-gb/auction-catalogues/1818-auctioneers/catalogue-id-sr1810075/search-filter?page=1&pageSize=240","Wait")
        wait for browser event("Everything Loaded","")
        wait(2)
        set(#row,0,"Global")
        set(#pageination,$exists(<class="next">),"Global")
        clear table(&data)
        loop while($comparison(#pageination,"= Equals","true")) {
            if($comparison(#pageination,"= Equals","true")) {
                then {
                    build_table()
                }
                else {
                }
            }
            click($element offset(<class="next">,1),"Left Click","No")
            wait for browser event("Everything Loaded","")
            wait(2)
            set(#pageination,$exists(<class="next">),"Global")
        }
    }
    divider
    define build_table {
        set list position(%Lot number,0)
        set list position(%title,0)
        set list position(%url,0)
        clear list(%Lot number)
        clear list(%title)
        clear list(%url)
        add list to list(%Lot number,$scrape attribute(<class="number">,"innertext"),"Delete","Global")
        add list to list(%title,$find regular expression($scrape attribute(<class="main">,"outerhtml"),"(?<=\\<p\\>).*?(?=\\<\\/p\\>)"),"Don\'t Delete","Global")
        add list to list(%url,$find regular expression($scrape attribute(<class="main">,"outerhtml"),"(?<=\\<a\\ href\\=\\\").*?(?=\\\"\\>More)"),"Delete","Global")
        loop($list total(%Lot number)) {
            set table cell(&data,#row,0,$next list item(%Lot number))
            set table cell(&data,#row,1,$next list item(%title))
            set table cell(&data,#row,2,$next list item(%url))
            increment(#row)
        }
    }

  3. Is this what your after?

     

    navigate("https://www.dollartree.com/household/500/index.cat","Wait")
    wait for browser event("Everything Loaded","")
    clear list(%CategoryTitle)
    clear list(%CategoryUrl)
    add list to list(%CategoryTitle,$find regular expression($replace($scrape attribute(<id="left_nav_data">,"outerhtml"),"&",$nothing),"(?<=\\\"\\>).*?(?=\\<\\/a\\>)"),"Don\'t Delete","Global")
    add list to list(%CategoryUrl,$find regular expression($scrape attribute(<id="left_nav_data">,"outerhtml"),"(?<=href\\=\\\"\\/).*?(?=\\\"\\>)"),"Delete","Global")

  4. See if this works for you

     

    ui text box("Phone",#phone)
    ui stat monitor("Name: ","{%first} {%lsname}")
    ui stat monitor("Address: ",%address)
    ui button("Check") {
        navigate("http://118.tdc.dk/search/go?what={#phone}","Wait")
        wait for browser event("DOM Ready","")
        clear list(%first)
        clear list(%lsname)
        clear list(%address)
        set(#listing0,$scrape attribute(<href=w"/person/*">,"fullhref"),"Global")
        set(#lastname,$find regular expression(#listing0,"(?<=\\+).*?(?=\\/)"),"Global")
        add list to list(%first,$find regular expression(#listing0,"(?<=person\\/).*?(?=\\+)"),"Delete","Global")
        add list to list(%lsname,$list from text($replace(#lastname,"+"," "),"
    "),"Delete","Global")
        add list to list(%address,$scrape attribute(<tagname="address">,"innertext"),"Delete","Global")
    }

  5. This worked 
    set(#a,"<h3>
                                                
            <a href=\'/person/Firstname+Lastname/1234-City+A?what=12345678&n=1&page=1&sid=a*%5D%5DJEM%25%5CT0%22\'>
                
                
                Firstname Lastname                                                    
            </a>
                                                    
    </h3>","Global")
    alert($replace($find regular expression(#a,"(?<=\\w+\\/).*?(?=\\/\\d)"),"+",$new line))

  6. For a little clarification.
     

    The data your trying extract is: 

    "button"         => "Button Translations",
     "date"             => "Date & Time Translations",

     
    And your saying there could be more rows than just two.
    Are the rowing your trying to extract the same format as your example?
×
×
  • Create New...