Sometimes you might need to have the all the hyperlinks from a webpage.For example if you are a developer you might be in need of a javascript or css of a webpage that is hosted externally.Sometimes this trick will also help you extract the download link from survey sites.Whatever might be the reason let us learn to do this.We will learn 3 different ways to extract hyperlinks from a webpage in this post.
Extract Hyperlinks From A Webpage In Chrome
This trick is very simple but is limited to Google chrome users.The trick is performed with via the Chrome Dev tools.
Steps To Extract Hyperlinks From A Webpage In Chrome
- Go to the page from which you want to extract the hyperlinks.
- Click on 'Inspect Element' from the right click menu.
- Click on the 'Console tab'.
- Now paste the following code in the input field. urls = $$('a'); for (url in urls) console.log ( urls[url].href );
- Hit enter.
iWeb Tools's Link Extractor
This is a web based service which means you don't have to download any software nor it is limited to any users.You can use this tool here.This tool will show the type of file along with the anchor text in the output field.
How To Use This Tool?
Using this tool is very simple.All you have to do is to go the the above url.Enter the webpage url in the input field and hit extract!
BuzzStream Tool
This is quite different from the other two because in this case we are extracting all the urls from an html code.This trick will not display the output links on the website itself.All the links on that page are exported as a CSV file which automatically downloads to your computer once you hit the create CSV button.The CSV file has three different columns including the actual link,it's original website and the anchor text.
How To Use This Tool?
- Go to Buzz Stream Urls Extract Tool
- Copy the source code of the webpage from which you want to extract the Url.
- Paste it in the tool's input field and hit create CSV.A CSV file containing the hyperlinks will automatically be downloaded to your computer.
How To Get The Source Code Of Webpages?
Chrome:Right click on the webpage and click on view page source or press Ctrl + U
Internet Explorer:Right click from the webpage and click on view source.
Firefox & Netscape:Right click and click on view page source or press Ctrl + U
Opera:From the view menu click on source or press Ctrl + F3
Why Google Chrome Is The Best Browser For developers?
Blogger Comment
Facebook Comment