Jump to content
UBot Underground

Really Need Help On Threadspawn


Recommended Posts

Hello,

 

I have some difficulties with Threadspawn, what i did is:

 

1. Use the threadspawn to open new browsers

2. Each browser will scrape data on each url

3. After scraping it will add to list or table then save to file

 

In brief below, the code does not work, i really need help!

 

add list to list(%links,$list from file("C:\\Users\\NGUYEN HUY LINH\\Desktop\\tuoitre-urls.txt"),"Delete","Global")
set list position(%links,0)
thread spawn($list total(%links),3) {
    in new browser {
        navigate($next list item(%links),"Wait")
        wait(3)
        set(#title,$scrape attribute(<id="object_id">,"innertext"),"Local")
        add item to list(%abc,#title,"Don\'t Delete","Global")

        wait(3)
    }
}

Link to post
Share on other sites

try

ui open file("File",#File)
clear list(%links)
clear list(%abc)
add list to list(%links,$list from file(#File),"Delete","Global")
set list position(%links,0)
thread spawn($list total(%links),3) {
    in new browser {
        navigate($next list item(%links),"Wait")
        wait for browser event("Everything Loaded","")
        wait(3)
        set(#title,$title,"Local")
        add item to list(%abc,#title,"Don\'t Delete","Global")
    }
    wait(0.1)
}
save to file("{$special folder("Desktop")}\\Test.txt",%abc)
Link to post
Share on other sites

Thanks Pad,

 

Thanks Pad, the code work great for add to list, but with table (increment), it miss lot of rows, really dont know why, could you advise?

 

add list to list(%links,$list from file("C:\\Users\\COMPUTER\\Desktop\\links.txt"),"Delete","Global")
set list position(%links,0)
set(#rownum,0,"Global")
thread spawn($list total(%links),3) {
    in new browser {
        navigate($next list item(%links),"Wait")
        wait(3)
        set(#title,$scrape attribute(<id="object_id">,"innertext"),"Local")
        set table cell(&import,#rownum,1,#title)
        wait(1)
        increment(#rownum)
    }
}

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