Skip to content
RTILA Web Business Automation
  • Home
  • Features
  • Pricing
  • Marketplace
  • Support
    • Documentation

Cart

RTILA Web Business Automation
  • Home
  • Features
  • Pricing
  • Marketplace
  • Support
    • Documentation
Free Download
Free Download

Billing & Licensing

10
  • Change License’s registered email address
  • Upgrade a License
  • Manage License Activation Count
  • RTILA Studio local database
  • Standalone Exe Antivirus False Positive Alert
  • Team Member Activation URL & License
  • AppSumo Codes Redemption
  • Download & Activate RTILA Studio
  • AppSumo Code Stacking & Upgrade
  • Mac OS Installation Warning

Custom Commands

36
  • WordPress Posts via API (beta)
  • Webhook Send Request
  • Target Text Before After
  • Download File to Folder
  • Clipboard Copy & Paste
  • ChatGPT API Full Control
  • Generate Random Numbers and Text
  • Regex & JS Filters
  • API Bridge Get Post Requests
  • WhatsApp API send MSG
  • GET HTML
  • Slack Notification Command
  • Target Elements With Text Value
  • Directory Get Files Path
  • Folder and File Monitoring
  • Get iFrame URL
  • Get File Content
  • Verify License Easy Digital Downloads
  • Save Variable to File
  • Rename File
  • Move File to New Directory
  • Delete File
  • Mouse Events
  • Get System Info
  • Airtable Get & Update Records
  • Email Send Via SMTP
  • Wait For Element to disappear
  • OCR Passport Reader
  • Target Element in Shadow Dom
  • Airtable Get Records
  • Airtable Update Records
  • Sanitize URL
  • Email Verification
  • Get Hardware ID HWID
  • Timestamp Unix and UTC
  • Switch Tab Focus Command

How-To & Tutorials

42
  • How to target a CSS element
  • Change default Browser
  • Export Results to a CSV file
  • Profile Session Feature
  • OCR Feature: read text from images
  • Auto Download Pinterest Images
  • Save current URL using JavaScript
  • Search & Filter Projects
  • Error handling Strategy
  • Working with Arrays and Objects in RTILA
  • Auto Comment On WordPress Posts
  • Run Automations in Silent Mode
  • License Check for Standalone Executables
  • Trigger Standalone Bots via Command lines
  • How To Find Custom Collections For List type Datasets
  • Correcting & Completing Auto-Recorder Commands
  • RTILA WordPress Plugin installation & configuration
  • Using Developer Tools In RTILA Studio
  • Create A Project From Scratch
  • Bring back disappearing commands & properties
  • Export & share an RTILA project file
  • Install Browser Extensions using Profile Session
  • How To Fill a Form Using Generic Form Filler Child-Project
  • Project Settings: Import URLs manual entry, From File, From Project, and Read XML Sitemap
  • Project Settings: Import URLs manual entry
  • Use Local Storage Variable to scrape Do-follow Links
  • Schedule Launch of Automations
  • Email Results File via Gmail
  • Read from Google Sheets & Post on WordPress
  • Website Load Testing Automation
  • Read data from a txt or csv file
  • Downloading files
  • Open in a New tab
  • Using filters to complete a URL
  • Choosing the right collection
  • Set a Counter with JavaScript
  • Setup reCAPTCHA Resolution
  • Woo Categories & ChatGPT API
  • Login to Google Account & share profile session
  • Google Search Baby Steps
  • Auto-Recorder as a 1st step
  • Standalone Executable Bots

Official Commands

58
  • List Command
  • Incogniton Anti-detect browser
  • Save results to file command
  • RTILA Cloud API Documentation
  • FTP / SFTP Command
  • Custom Commands
  • Integrations
  • RPA & Desktop OS Commands
  • Add And Configure Dataset Properties
  • Inspection Panel Interface & Elements
  • Config & binaries files for Standalone
  • Focus On Element Command
  • Go To Url Command
  • Scroll Element Command
  • Execute JavaScript Code command
  • Reload Page Command
  • Compare Variables Condition
  • Take Screenshot Command
  • Smart Variable (ChatGPT API)
  • Child Projects
  • Confirm (Dialog Box) Command
  • Populate Text Field Command
  • Hover Mouse On Element Command
  • Download Page Command
  • Stop Automation Command
  • Log Message Command
  • Input (prompt box) Variable
  • Extract Results Command
  • Wait for Element to Appear Command
  • Selector (DOM element)
  • Check Radio Input Command
  • Dynamic Variable (JavaScript Code)
  • Static Variables
  • Set Checkbox State Command
  • Set Dropdown Value Command
  • Press a Keyboard Key Command
  • Upload File Command
  • Double Click On An Element Event
  • Click On An Element Event
  • Switch Browser Identity Command
  • Slack Notification Command
  • Save as Pdf Command
  • Go Back To Previous Page Command
  • Go Forward To Next Page Command
  • Proxies Built-In Rotation
  • External Proxy Rotation API
  • Regular Expressions
  • Mock Location Command
  • Close Page Command
  • Desktop Notification Command
  • Command Folder
  • Clear Cookie Command
  • Change Page Size Command
  • Break Loop Command
  • DataSet Types
  • Link Crawler Command
  • Alert Message Command
  • Wait Commands
  • Home
  • Docs
  • How-To & Tutorials
  • Use Local Storage Variable to scrape Do-follow Links
View Categories

Use Local Storage Variable to scrape Do-follow Links

3 min read

Use Case #

When studying the competition or even doing an analysis of your own website, you may want to find out all the links of a given page that are using do-follow. Because the do-follow element cannot be captured using a CSS locator, we need to use a JavaScript that would capture all the do-follow URLs found on a given page and save them as an internal variable called Local Storage Variable. The role of this type of variable is to be able to feed or capture data that is manipulated by a JavaScript code and not an RTILA command. In this use case we cover the flow whereby it is the JavaScript Execute Command code that captures and saves the do-follow URLs into an Local Storage Variable. And then we will use a Dynamic Command which will allow us to run a one line JavaScript code to capture the value of the Local Storage Variable (list of do-follow URLs) and “transfer it an RTILA Variable Command (here the Dynamic Variable). This allows us then to easily re-use and call the Dynamic Variable value in any other commands or properties in the datasets.

Import a list of URLs to crawl for do-follow links #

First step is to load a txt file with all the URLs for which you want to find out and scrape their respective do-follow links. See below screenshot and make sure you use a txt file that has the ANSI format and that you have one URL per line.

Use Execute JavaScript command to catch do-follow links #

As explained earlier we need to use a JavaScript code that will go through all the links (href) in the source code and find out those using do-follow as an attribute and is saving all those urls seperated by a comma into a Local Storage Variable called “do-Follow-Links”. The JavaScript code is shared below.

Copy CodeCopiedUse a different Browser
const links = document.querySelectorAll('a');
const doFollowLinks = [];
for (let link of links) {
  if (link.rel === '' || !link.rel.includes('nofollow')) {
    doFollowLinks.push(link.getAttribute('href'));
  }
}
console.log(doFollowLinks);
window.localStorage.setItem('do-Follow-Links', doFollowLinks);

Transfer Local Storage value into a Dynamic Variable value #

Once the URLs are identified and saved by our Execute JavaScript command into the ” Local Storage Variable called do-Follow-Links”, we then use a Dynamic Variable to execute an other line of JavaScript to “transfer” the value of “do-Follow-Links” into the Dynamic Variable Command VALUE.

The one liner JavaScript code used to “transfer” the Local Storage value into the Dynamic Variable Value is shared below

Copy CodeCopiedUse a different Browser
VALUE=window.localStorage.getItem('do-Follow-Links');

We can now use the syntax {{VariableName}} to print and share this value with other parts of RTILA Studio, in our case we want to save the list of URLs into a DataSet property, see below how we configure the properties. For the Source URL we are using the JavaScript action “FIELD_VALUE=window.location.href” to capture current URL being visited by RTILA. As for the Do-Follow URLs property we are using the syntax that calls the current value of our Dynamic Variable, in our case this syntax: {{Dynamic}}.

Download, edit and improve #

You can download this Public Template file as well as the txt file example by clicking here. Feel free to replace the URLs or add other commands and actions or properties to the flow.

    Still stuck? How can we help?

    How can we help?

    Updated on 10/04/2023
    Schedule Launch of Automations

    Powered by BetterDocs

    Table of Contents
    • Use Case
    • Import a list of URLs to crawl for do-follow links
    • Use Execute JavaScript command to catch do-follow links
    • Transfer Local Storage value into a Dynamic Variable value
    • Download, edit and improve

    INFO & LEGALS

    PRICING
    PAYMENTS & REFUND
    COOKIES - PRIVACY
    LICENSE AGREEMENT

    DOWNLOADS

    BOT LAUNCHER
    RTILA STUDIO ON GITHUB
    BOT & TEMPLATES
    PARTNERSHIPS

    RESOURCES

    VIDEO TUTORIALS
    DOCUMENTATION
    SUPPORT PORTAL
    FB COMMUNITY SUPPORT

    stay in touch

    Subscription Form

    follow us on

    • Facebook
    • YouTube
    • RTILA LinkedIn Page
    Copyright © RTILA CORPORATION