Multiple Selectors

Is there a way to order the selectors? For example, if I have two different elements for possible item URLs, can I force Feed Creator to look in one element first then, the other.

I’m having an issue where I’d like it to use a different URL than the item link (a link, for example, in the feed text). Sometimes, there’s a link in the description. Sometimes, not. When there is one, I’d like to use it. If not, I’d like it to revert or leave the item URL blank.

I’ve been able to extract the item URL from the feed text, but unfortunately, Feed Creator then passes over all items that don’t have URLs in the feed text and excludes them. That behavior doesn’t seem to naturally follow from how the item URL selector is discussed in the docs.

Thanks!

Hi there,

You can use multiple selectors by using commas, e.g.

Item URL: a.main-link, p a.link-in-description

But if both selectors match, the matching element that appears first in the document will be returned (ie. document order), so you won’t see a different result if you switch the two selectors around.

Item URL: p a.link-in-description, a.main-link will produce the same result as the selector above.

You can disable item URLs completely by entering 0 in the item URL field, then you can extract items whether there is an associated URL or not, but unfortunately there is currently no good way to have item URLs for some items and no item URL for others.

Thank you so much for your incredibly prompt reply!

1 Like