Jump to content
UBot Underground

Click On A Random Link On Any Page?


Recommended Posts

So I'm creating a traffic bot right now.

 

Finding it difficult getting the bot to click on a random link on the page. Has anyone managed to solve this?

 

Note: I don't want to scrape links, and then go to the page; it's important to actually click the link.

Link to post
Share on other sites

So I'm creating a traffic bot right now.

 

Finding it difficult getting the bot to click on a random link on the page. Has anyone managed to solve this?

 

Note: I don't want to scrape links, and then go to the page; it's important to actually click the link.

 

 

Not sure i understand why you don't want to scrape the links but there are 2 ways to do it:

 

1st. and the best method is to scrape the internal links into a list, clean the list to remove unwanted links to images and pages, and click randomly on one of them

 

2nd. is simpler but not as exact and can fail if too many links on the page: use wildcards to click on a random link using a random "$element offset".

Link to post
Share on other sites

There are a couple of ways to do it but the easiest to explain is:

 

Scrape all the links on the page (yes all not just internal) this is just getting you a number lets say there are 50 links then:

Set a $rand from 0,49

Scrape the link and see if it's internal using element offset with the random number

If its internal then use element offset to click it

Link to post
Share on other sites

heres what the lads above me said with the code

define clickRandomLink {
    add list to list(%totalLinks,$scrape attribute(<tagname="a">,"outerhtml"),"Don\'t Delete","Local")
    click($element offset(<tagname="a">,$rand(0,$subtract($list total(%totalLinks),1))),"Left Click","No")
}
clickRandomLink()

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