Jump to content
UBot Underground

Is This Ubot 5 Bug ? $Scrape Attribute Fails To Scrape To %List


Recommended Posts

Hi,
 
Consider this snippet ...
 
add list to list($scrape attribute(<outerhtml=w"<span>*</span>">,"innertext"),%keywords,"Delete","Global")
 
Is not the keywords google suggest are supposed to be scraped to the %keywords list ? Yes or no ?
So why debugger showing me "$scrape attribute" has scraped keywords with a line break inbetween each keyword.
Like so:
 
brute force
 
brute power
 
etc.
 
Why the line break ? The debugger is listing like this. Terrible!
 
Another issue is that, the debugger shows the %keywords list is empty. Why empty since $scrape attribute has found about 20 keywords and I set the code for $scrape attribute to dump the scraped items to the %keywords list ?
 
Here's the full code.
On the url field, type "http://www.google.com" without the quotes.
On the keywords field, type "brute force" without the quotes.
In the dropdown UI, select "20" results.
Run the code. Check the debugger.
 
ui text box("Url",#ui textbox_url)
ui text box("Keywords",#ui textbox_keywords)
ui drop down("Max Results","10,20,30,40,50,60,70,80,90,100",#ui dropdown_max results)
ui save file("Save To",#ui save file_save to)
ui stat monitor("Total Results",$list total(%keywords))
divider
divider
set(#max results,#ui dropdown_max results,"Global")
set(#navigate,#ui textbox_url,"Global")
set(#keywords,#ui textbox_keywords,"Global")
set(#save to,#ui save file_save to,"Global")
divider
navigate(#navigate,"Wait")
wait for element(<type="text">,"","Appear")
wait for element(<type="submit">,"","Appear")
wait($rand(1,5))
if($exists(<type="text">)) {
    then {
        change attribute(<type="text">,"value",$nothing)
        wait($rand(1,5))
        type text(<type="text">,#keywords,"Standard")
        wait($rand(1,5))
    }
    else {
        alert("ERROR ALERT: 

Cannot detect \"Search Box\"!
Quitting the session.")
        stop script
    }
}
clear list(%keywords)
add list to list($scrape attribute(<outerhtml=w"<span>*</span>">,"innertext"),%keywords,"Delete","Global")
save to file(#save to,%keywords)
Link to post
Share on other sites

I tested your code. And no, there is no bug. You only confused how to use the "add list to list" command here.

This:

add list to list($scrape attribute(<outerhtml=w"<span>*</span>">,"innertext"),%keywords,"Delete","Global")

Should be this:

add list to list(%keywords,$scrape attribute(<outerhtml=w"<span>*</span>">,"innertext"),"Delete","Global")

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