Jump to content
UBot Underground

Why does full automation break this script ?


Recommended Posts

Hi guy's,

 

Today I have another weird one... I need to track the indexing of a growing number of websites. I normally use the "site:domainname.com" command in Google to see how many pages are indexed for a particular domain on any given day. I can no longer afford to do this by hand and built the following script...

 

ui stat monitor("Number of sites to check: {$list total(%SitesList)}""")
ui stat monitor("Current site: "$replace(#CurrentSite"site:"$nothing))
set(#SitesToCheck"{$nothing}{$replace($get files("{$special folder("Desktop")}\\INDEXING""No"), ".csv", $nothing)}""Global")
add list to list(%SitesList$list from text(#SitesToCheck"
"), "Delete""Global")
set(#SitesToCheck$nothing"Global")
navigate("http://google.com""Wait")
wait for element(<name="q">"""Appear")
set(#CurrentSite"site:{$list item(%SitesList, 0)}""Global")
loop($list total(%SitesList)) {
    set(#CurrentSite"site:{$next list item(%SitesList)}""Global")
    wait($rand(1, 3))
    navigate("http://google.com""Wait")
    type text(<name="q">#CurrentSite"Standard")
    click(<name="btnG">"Left Click""No")
    set(#results$scrape attribute(<id="resultStats">"innertext"), "Global")
    set(#results$replace($replace regular expression(#results"About (.\{1,\}) results.\{1,\}""$1"), ","$nothing), "Global")
    wait(1)
    alert(#results)
}
divider

 

Now here's the really, really strange bit...

 

When I run the script "step by step", it pop ups an alert box with the number of pages indexed, yet whenever I try to run the full script the popup (alert box), is empty. I don't think it's a problem with memory either. I have an 8 Gig Windows 7 Machine. Does this kind of thing happen more often ? What could be the problem here?

 

All suggestions are welcome  :D

 

Thanks for reading my post.

Edited by carlstarus
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...