Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Getting scraped href linked with our website

I am trying to scrap thorough this anchor tag <a href="/user/all?tag=114"> </a>
But I am getting the result as mywebsite.com/user/all?tag=114 any way to avoid it and only get what’s on anchor tag no need of linking the href link with my website, Any help would be appreciated thanks in advance.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Here are two ways to get the href attribute value:

const anchor = document.querySelector('a');
const {href} = anchor;
const hrefRaw = anchor.getAttribute('href');

console.log({href, hrefRaw});
<a href="/user/all?tag=114">link</a>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading