Jump to content
UBot Underground

How To "exact Search" With Search Page


Recommended Posts

Hello, I'm trying to create scraper that will save me only url of pages that does not contain certain word. In my case it is word "day", problem is that  $search page takes as possitive result also words that contains day, like "today" which I do not want. is there any way how to perform "exact search" with ubot? thanks for any help.

Link to post
Share on other sites

define $containsURL(#search) {
if($contains($url,#search)) {
then {
return("true")
}
else {
return("false")
}
}
}
navigate("http://www.ubotstudio.com/resources","Wait")
alert($containsURL("resources"))

  • Like 1
Link to post
Share on other sites

Hello, thanks a lot for help, but this does not seem to solve my problem. What I need to know is just how to perform "exact search", so when I'm searching for word "day" it only finds word "day" and not "today", "holiday" or "days" etc..

Link to post
Share on other sites

this is how my script looks now, everything works except that one thing:

ui text box("Total Loops:",#total loops)
clear list(%neupdatovany)
clear list(%updatovany)
ui stat monitor("soucasna adresa",$url)
ui stat monitor("Total Loops:",#total loops)
ui stat monitor("Loop:",#count)
set(#row,0,"Global")
wait(2)
ui open file("urls adresy",#adresa)
create table from file(#adresa,&adresy)
loop(#total loops) {
    clear cookies
    navigate($table cell(&adresy,#row,0),"Wait")
    wait for browser event("Page Loaded","")
    set(#soucasnadresa,$url,"Global")
    if($search page("day")) {
        then {
            add item to list(%updatovany,#soucasnadresa,"Don\'t Delete","Global")
        }
        else {
            add item to list(%neupdatovany,#soucasnadresa,"Don\'t Delete","Global")
        }
    }
    wait(1)
    increment(#row)
}
save to file("C:\\Users\\Administrator\\Desktop\\urls\\neupdatovanyurls.txt",%neupdatovany)
save to file("C:\\Users\\Administrator\\Desktop\\urls\\updatovanyurls.txt",%updatovany)
Link to post
Share on other sites

I still don't know how to solve this, I thought this will be the most easy part and I'm stuck on it for three days. I just dont know how to use find regular expression on page, I tried it with $URL, but it seems it searches only the actual URL address and not the whole page and I just don't know how to make it work on whole page.

Link to post
Share on other sites
navigate("http://network.ubotstudio.com/forum/index.php/topic/20080-how-to-exact-search-with-search-page/#entry125530", "Wait")
wait for browser event("Everything Loaded", "")
alert("found {$find regular expression($document text, "\\bday\\b")}")

You should be using document text rather then search page,with find regular expression

Link to post
Share on other sites

Ok I have solved it finally by taking different path and using $exists with wildcard, but thanks for your help at least I learned something about regex.

Edited by Chezzyk
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...