Dynamic SelectorLink?

Here are an example of URLs I am interested in:





Here is my sitemap:

{"_id":"objectif_patch","startUrl":["https://github.com/piercus?utf8=✓&tab=repositories&q=&type=source&language="],"selectors":[{"id":"repo_1","type":"SelectorLink","parentSelectors":["_root"],"selector":"li.col-12:nth-of-type(1) a","multiple":false,"delay":0},{"id":"commits","type":"SelectorLink","parentSelectors":["repo_1"],"selector":"li.commits a","multiple":false,"delay":0},{"id":"listing","type":"SelectorElement","parentSelectors":["commits"],"selector":"div.commit-links-cell","multiple":true,"delay":0},{"id":"objectif_path","type":"SelectorLink","parentSelectors":["listing"],"selector":"a.sha","multiple":false,"delay":0}]}

Question :

The first SelectorLink : repo_1 goes to the first link - This is what I want.

But I would like to create another SelectorLink called "repo_end" which has to go to the last link. However, regarding the URL I am scraping, the last link is not always the same. So I am not able to create this SelectorLink "repo_end"

Are you able to help me ?

Many thanks.

Any ideas ? :heart::heart:

If you just want to select the last link of the list, you can use the selector 'li.col-12:last-of-type a' which will select the least link in the list regardless of it's numerical position.

well done. That works !