Jump to content
UBot Underground

Find Internal Pages


Recommended Posts

Hi guys, I need some help from you ...
If you can help me with a good answer, I'd be grateful.
 
I need a simple script that is based on regex, this script must find all urls internal from current page.

For exemple:

 

I found a function but not working correctly for me.
This function extracts all URLs on the page, I need to extract only the internal urls.

For example, if I navigate on www.unuro.com ... need function to extract only the pages that have domain unuro.com

add list to list(%internal pages, $find regular expression($document text, "(((ftp|https?):\\/\\/)(www\\.)?|www\\.)([\\da-z-_\\.]+)([a-z\\.]\{2,7\})([\\/\\w\\.-_\\?\\&]*)*\\/?"), "Delete", "Global")

Thank you.

Link to post
Share on other sites

Try.

set(#NowDomain,$eval("var x = window.location.host;
x;"),"Global")
set(#NowDomain,$replace(#NowDomain,".","\\."),"Global")
set(#NowDomain,$replace(#NowDomain,"-","\\-"),"Global")
set(#NowDomain,$replace(#NowDomain,"www.",""),"Global")
clear list(%internal pages)
set(#ss,$document text,"Global")
add list to list(%internal pages,$find regular expression($document text,"(((ftp|https?):\\/\\/)(www\\.)?|www\\.){#NowDomain}([\\/\\w\\.-_\\?\\&]*)*\\/?"),"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...