Nth-of-type doesn't scrape first 3 links as specified

Hi all,

I'm having an issue with nth-of-type not scraping the first 3 links as requested.

The code I'm using is...

div:nth-of-type(-n+3) div:nth-of-type(-n+3) .info a

However this is scraping the first 2 at the moment even though on the element preview it shows the first 3.

I've experimented with a bunch of different alternatives including using nth-child and also found a poster with a similar problem and attempted to follow those instructions but have hit a road block.

Any help would be greatly appreciated. :slightly_smiling_face:

Url: Pinjarra Scarpside - R1 3YO Maiden, Form Guide and Tips - 20th Jan 2022

Sitemap:
{"_id":"test","startUrl":["Free Horse Racing Form Guide & Fields on Upcoming Races | Racenet a.horseracing-selection-details-name","multiple":true,"delay":0},{"id":"tab","parentSelectors":["horse_name_link"],"type":"SelectorElementClick","clickElementSelector":"span:nth-of-type(3) a","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","multiple":true,"selector":"div.profile-result-tab-list-desktop"},{"id":"results","parentSelectors":["tab"],"type":"SelectorLink","selector":"div:nth-of-type(-n+3) div:nth-of-type(-n+3) .info a","multiple":true,"delay":0},{"id":"wrapper","parentSelectors":["results"],"type":"SelectorElement","selector":"div.selection-result","multiple":true,"delay":0},{"id":"horse_name1","parentSelectors":["wrapper"],"type":"SelectorText","selector":".selection-result__info-competitor-name a","multiple":false,"delay":0,"regex":""},{"id":"price1","parentSelectors":["wrapper"],"type":"SelectorText","selector":".odds div:nth-of-type(2) div:nth-of-type(2)","multiple":false,"delay":0,"regex":""},{"id":"place1","parentSelectors":["wrapper"],"type":"SelectorText","selector":"span.selection-result__competitor-place","multiple":false,"delay":0,"regex":""}]}

@montecristo Hi, it does not seem like your sitemap JSON is valid, please when pasting it be sure to apply the preformatted text option. Thanks.

Hello friends,

I actually managed to solve this problem on my own (yay for me) with a little research on the internet and a lot trial and error so thought I'd share the solution for anyone who happens to come across this same problem.

Where I was going wrong was I was using an element wrapper which won't allow you to select only certain links. I solved the problem by using an ordinary link selector and it worked no problem.