Extract URL from selector

Hello!

Can someone help me extract a URL from a selector? When I switch to innerHTML, I see the < a > tag with the exact href parameter that I need to extract, and it’s the only one there, with URL visible. Any guidance or tip will be appreciated!

@zorzstudios can you change the selection to select the a (anchor) element? once it has been selected, change the field from text to href property. that should do it.

1 Like

Thank you! With a bit of a struggle (I have a limited understanding of coding), I seemed to figure out how to find that URL as a selector. The selector looks like this: [aria-posinset] div:nth-child(2) [class*=‘span’] a

However, wouldn’t it just monitor changes to this element? The URL won’t change. Sorry if I wasn’t clear initially but I’d like to bring that URL via webhook notification. I use Zoho Cliq, which works similarly to Slack. Is there a way to push that extracted URL as a parameter along with {{sieve_data.text}}? If I need to use “Add Query Param” button, what would it be for that URL? Thank you!

good work figuring out the selector to select the links!

thanks for the clarification. i am assuming that you need the outer element’s text along with the urls.

webhook can send the data is extracted from the page. it is possible to include the urls in sieve_data.text but not as a separate parameter in the webhook. it can be done by using two selections:

  1. select the element that needs to be monitored for changes.
  2. select the links using the selector [aria-posinset] div:nth-child(2) [class*=‘span’] a and select href as the field.

now the sieve_data.text will contain the monitored text as well as the urls. these can then be sent to the webhook.

does this make sense?