Extract Urls with Target Slug

Description

This Custom Command allows you to parse any web page and find specific URLs that you want to capture and later feed to an other command or flow. This for instance can be used to get all the URLs of products listings in a given page or can be used to get specific URLs from an xml sitemap… Various options detailed below will allow you to specify your URL targeting and even find, replace, append or postpend data to URLs that would otherwise be invalid or incomplete.
How to configure and use this Custom Command :
1) Specify a keyword that the URL must contain.

2) Specify the file extension that you want to target, for example only .html pages, or only .mpg or .php etc…

3) Sometimes only the relative url is in the source code and you may want to append it with the main domain name/URL so that the final URL will start with https://website.com/folder/url-slug-extracted.php

4) In some other cases you may want to add some text at the end of the URL (Postpend) for example adding “/index.html” to specifically load a file in that original folder
5) In some cases multiple URLs can be contained in the same element. For instance an image may have a URL in it’s src as well as a different URL in it’s srcset attribute. By choosing “ALL” you will get both URLs. By choosing “Custom Attribute” only the URL of the attribute you specify in point 6 would be targeted.

6) If you chose “Custom Attribute” in Point 5 then specify the target attribute here.

7) If you want certain characters to be removed or replaced specify them here

8) Add here the replacement characters or leave empty to delete the characters specified in point 7

9) Often the same URL can be present more than once on the same page, choose “Yes” if you wish to automatically remove/avoid duplicates.
Watch Video Demo :
Note:
If you find our template useful and like it, please give us a favor by sharing this template to your community for wide circulation. Thanks