As an SEO, you would sometimes want to extract all links from a web page to run a crawl and do some checks on the internal links. Usually, this might require the use of browser extensions. However, in this guide, I’ll walk you through creating a simple bookmarklet to do the job for you without needing any extensions to retrieve every URL, and its associated anchor text from a webpage. And the most convenient part? This rich set of data will automatically download in a tidy CSV format, making your data analysis more straightforward.
How to Extract Links from a Web Page by Creating a Bookmarklet?
Step 1: Establish Your Bookmarklet
- Next, you need to create a new bookmark in your web browser. If you’re using Chrome, simply click on the three dots in the upper right corner, navigate to Bookmarks and select Bookmark Manager. Within the Bookmark Manager interface, click on the three dots again, and choose “Add New Bookmark”.
- At this point, assign a descriptive name to your bookmark such as “Extract Links”.
- To finish up, save the bookmark.
Step 2: Using the ‘Extract Links’ Bookmarklet
- Utilising your newly crafted bookmarklet is simple. Navigate to the webpage you’re interested in analysing, then click on the “Extract Links” bookmarklet you created in the previous step.
Equipped with this bookmarklet, you now hold the power to quickly extract all links from a web page.