Get all the URLs specified by the href attribute

I like to web scrape all the URLs (gist.github.com) specified by the href attribute at the web page
Angular ElementRef, TemplateRef, and ViewContainerRef Made Easy | JavaScript in Plain English .

i.e. the desired results are:
https://gist.github.com/kagklis/746730125c040099a2bbd7864eb58521/raw/615b966efd49531e492bf31e8b8938378e0de1ec/element-ref-class.ts
https://gist.github.com/kagklis/fe2f47dcea8015690025d5d83f1e3594/raw/7434f36f132c4b2780070f7b5c21f2f42009379b/element-ref-example.html
https://gist.github.com/kagklis/23bb0b92c3a0eef79790a3146aca08c7/raw/11c7e00924cd25635387600c94090bbffe39d1bc/element-ref-example.ts
...

How?

I tried and got some errors.
Attach screenshot.
Please help.
Thanks.

@albertkao Hi, it appears that these links are embedded into an iframe, therefore you will have to create the selector manually.

Example:

{"_id":"javascript","startUrl":["https://javascript.plainenglish.io/angular-elementref-templateref-viewcontainerref-8517b7ce3274"],"selectors":[{"id":"links","multiple":true,"parentSelectors":["scroll"],"selector":"iframe:iframe .gist-meta a[href*=\"gist\"]","type":"SelectorLink"},{"delay":500,"elementLimit":500,"id":"scroll","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementScroll"}]}

1 Like