Changing the order

Hi Guys -

If I've already written the sitemap and I want to change the order of each element, how can I do that.

Examples

{"_id":"test-test","startUrl":["https://www.ziggosport.nl/programmagids/"],"selectors":[{"id":"tvguide","type":"SelectorElement","selector":"div.tv-guide","parentSelectors":["_root","ND-Page-Link"],"multiple":true,"delay":0},{"id":"ND-Page-Link","type":"SelectorLink","selector":"a.tv-guide__days-switch__link.tv-guide__days-switch__link--next","parentSelectors":["_root","ND-Page-Link"],"multiple":false,"delay":0}]}

Here I have a Selector-Elements and THEN a link selector. What if I wanted the Link Selector to be first?

Any way to change that without rewriting the whole thing.

Hi!

You can either use JSON editor online or edit sitemap within a text editor, like Notepad++

Selectors are encapsulated within curvy parentheses:

{"id":"tvguide","type":"SelectorElement","selector":"div.tv-guide","parentSelectors":["_root","ND-Page-Link"],"multiple":true,"delay":0}

And separated by a comma

So all you have to do is to select particular selector within { }, and move it within sitemap.

Example of your selectors reversed:

{"_id":"test-test","startUrl":["https://www.ziggosport.nl/programmagids/"],"selectors":[{"id":"ND-Page-Link","type":"SelectorLink","selector":"a.tv-guide__days-switch__link.tv-guide__days-switch__link--next","parentSelectors":["_root","ND-Page-Link"],"multiple":false,"delay":0}, {"id":"tvguide","type":"SelectorElement","selector":"div.tv-guide","parentSelectors":["_root","ND-Page-Link"],"multiple":true,"delay":0}]}

1 Like