Simple sitemap gone wrong

Hi Guys -

Can't quite work out why each selector is being interpreted as a separate group of lines and not putting all three on one line.

'''
{"_id":"forty-under-forty","startUrl":["https://adage.com/article/special-report-40-under-40/meet-ad-age-2018-40-under-40/315005/"],"selectors":[{"id":"Title","type":"SelectorText","parentSelectors":["_root"],"selector":"div.genz-body-two p:nth-of-type(5n+1):nth-of-type(-5n+36),p:nth-of-type(5n+42):nth-of-type(-5n+72),p:nth-of-type(4n+76):nth-of-type(-4n+164),p:nth-of-type(4n+167):nth-of-type(-4n+171)","multiple":true,"regex":".*(?=\,)","delay":0},{"id":"Company","type":"SelectorText","parentSelectors":["_root"],"selector":"div.genz-body-two p:nth-of-type(5n+1):nth-of-type(-5n+36),p:nth-of-type(5n+42):nth-of-type(-5n+72),p:nth-of-type(4n+76):nth-of-type(-4n+164),p:nth-of-type(4n+167):nth-of-type(-4n+171)","multiple":true,"regex":"([^,]+$)","delay":0},{"id":"Name","type":"SelectorText","parentSelectors":["_root"],"selector":"div.genz-body-two div.retina","multiple":true,"regex":"","delay":0}]}
'''

Bret,
i've solved your problem, I've just had to sleep well in order to solve it lol.

Your sitemap:

{"_id":"adage","startUrl":["https://adage.com/article/special-report-40-under-40/meet-ad-age-2018-40-under-40/315005/"],"selectors":[{"id":"grouping","type":"SelectorElement","parentSelectors":["_root"],"selector":"figure.caption","multiple":true,"delay":0},{"id":"Name","type":"SelectorText","parentSelectors":["grouping"],"selector":"+","multiple":false,"regex":"","delay":0},{"id":"Position in the company","type":"SelectorText","parentSelectors":["grouping"],"selector":"++","multiple":false,"regex":".*(?=\\,)","delay":0},{"id":"Company","type":"SelectorText","parentSelectors":["grouping"],"selector":"++","multiple":false,"regex":"([^,]+$)","delay":0}]}

What I've used ('+') and ('++') are just incremental selectors that will pick an element that goes next after what I've already selected.

1 Like

That is genius. I had no idea you could use +++

1 Like