cancel
Showing results for 
Search instead for 
Did you mean: 
thelok
Level 7

Getting Embedded URLs

Is there a filter/function that allows me to get a list of the embedded URLs from the raw URL? I would like to perform processing on the embedded URLs.

For example, https://google.com/search?q=badsite1.com%20badsite2.com would return:

    [badsite1.com, badsite2.com]

0 Kudos
2 Replies
asabban
Level 17

Re: Getting Embedded URLs

Hello,

not out of the box. Certainly you can access the embedded domains from your example with something like

My_URLs = URL.GetParameter("q")

My_URLs = String.ReplaceAll(My_URLs, "%20", ", ");

My_URLs = "[" + My_URLs + "]"

So with some search&replace you can easily convert embedded URLs into any format you require, such as a JSON object, list of string or similar. But there is no "smart" option that will automatically detect embedded URLs in a string and convert them for you.

Best,

Andre

0 Kudos
McAfee Employee

Re: Getting Embedded URLs

Hi thelok,

It should be noted that the Web Gateway will look for embedded URLs when it performs URL filtering, the categorization of the URL should change if the MWG finds an embedded URL.

http://www.trustedsource.org/en/feedback/url?action=checksingle&product=14-ts&url=https%3A%2F%2Fwww....

I'm not sure if that's why you're asking this question, but thought I'd point it out.

Otherwise if you wanted to get the URLs for another reason, then Andre's response might be the best bet assuming you know how the domains can be found within the URL.

Best Regards,

Jon

0 Kudos