# Html selector to get src element from a tag

**URL:** <https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558>\
**Category:** General\
**Created:** [12 March 2021 22:05 UTC](https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558 "2021-03-12T22:05:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrycosta05](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henrycosta05/32/36350_2.png) [@henrycosta05](https://discourse.nodered.org/u/henrycosta05)\
**Post date:** [12 March 2021 22:05 UTC](https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558/1 "2021-03-12T22:05:27Z")

</div>

hi,  
I'm trying to get img src from web page.  
in html parser node, I done selecting output = "object of any attribute..." option. if I use any other of 3 available options I receive empty payload in debugger.

anyone knows the corrent way to extract souce with html query selector ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/01f6aed0fdf8df83e96f95318d0b36b9cb0cc96f.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 March 2021 22:55 UTC](https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558/2 "2021-03-12T22:55:25Z")

</div>

THis may help

[[attribute] | CSS-Tricks (css-tricks.com)](https://css-tricks.com/almanac/selectors/a/attribute/)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 March 2021 23:05 UTC](https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558/3 "2021-03-12T23:05:45Z")

</div>

And here is how you cheat...

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4ab51d7ea5c424d85deadd89c47a7afb441d102a.jpeg "How to find the css selector in chrome") ](https://www.youtube.com/watch?v=GMk7ZLuo6Po)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 May 2021 23:06 UTC](https://discourse.nodered.org/t/html-selector-to-get-src-element-from-a-tag/42558/4 "2021-05-11T23:06:41Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
