Jump to content
UBot Underground

Random Click on link from same domain


Recommended Posts

Hello all,

I have searched the forum for the help I need but I can't find a specific solution. I would like to navigate to a website and click on a random link. The link should only be an internal link and not an external link (like their Twitter profile).

 

Ideally the code would work with a very wide variety of sites.

 

Thanks,

Matt

Link to post
Share on other sites

Grab all the links on the page with a REGEX expression that extracts them from the page code, adding them to a list.

 

Then loop through the list and eliminate all links that have the domain name different from the current's page url.

 

Last, pick a random item (link) from the trimmed list and navigate to it...

  • Like 2
Link to post
Share on other sites
Got it! Thank you for pointing me in the right direction.

 

You're welcome!  Always a pleasure to help a fellow UBotter.

 

A good way to thank ANYONE on the Forum who's helping you is to hit the LIKE THIS button on the bottom-right corner of the post you really liked.  :P

 

Cheers!

  • Like 3
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...