Extracting urls from web page using chromedeveloper tools

Posted by jineesh uvantavida on Tuesday, December 6, 2022 Under: Tips & Ideas.

Step 1: In Chrome, go the website that you want to extract links from, like https://www.codeschool.com/. Step 2: Open Chrome Developer Tools by pressing Cmd + Opt + i (Mac) or F12 (Windows) in the same tab. Step 3: Click the Console panel near the top of Chrome Developer Tools. Inside the Console panel paste the JavaScript below and press Enter: var urls = document.getElementsByTagName('a'); for (url in urls) { console.log ( urls[url].href ); } Now you will see all the links from that particular web page.

In : Tips & Ideas. 


Tags: extracting urls from web page using chrome developer tools developer console 

Translate This Page

 


Make a free website with Yola