Selector/parent selectors

Hello :slight_smile:

Does anyone know what selectors are necessary to organize partial text from links, not just the links themselves and the content they lead to? I'm working on an analysis of early day motions from the UK house of commons. So far, no problems with pageination and scraping links/texts.

The only problem I can't work out is how to include a text subcategory included in each link. For some reason, the scrape is only able to combine either the text behind the link and the link itself, OR the text subcategory from the links, but not all three at the same time, and there seems to be no rhyme or reason behind the different combinations/why it doesn't show all information for each link.

Here's the sitemap!

{"_id":"edmdatabase","startUrl":["https://edm.parliament.uk/?IncludeSponsoredByMember=false&IncludeWithdrawn=false&IsPrayer=false&OrderBy=DateTabledDesc&ShowAdvanced=False&TabledFrom=26%2F11%2F1990&TabledTo=02%2F05%2F2022&Term=&page=[1-2595]"],"selectors":[{"id":"LInks","parentSelectors":["_root","LInks"],"type":"SelectorLink","selector":"a.overlay-link","multiple":true,"delay":0},{"id":"Party","parentSelectors":["LInks"],"type":"SelectorText","selector":"div.member-from","multiple":false,"delay":0,"regex":""},{"id":"Content","parentSelectors":["LInks"],"type":"SelectorText","selector":"div.motion-text-inner","multiple":false,"delay":0,"regex":""}]}

Hey. As for what I understood, you should create a wrapper element. The Link should be inside it and the Content should be inside the Link.

check if solves the matter:

{"_id":"edmdatabase","startUrl":["https://edm.parliament.uk/?IncludeSponsoredByMember=false&IncludeWithdrawn=false&IsPrayer=false&OrderBy=DateTabledDesc&ShowAdvanced=False&TabledFrom=26%2F11%2F1990&TabledTo=02%2F05%2F2022&Term=&page=[1-2595]"],"selectors":[{"delay":0,"id":"motion","multiple":true,"parentSelectors":["_root"],"selector":"div.card-inner","type":"SelectorElement"},{"delay":0,"id":"Party","multiple":false,"parentSelectors":["motion"],"regex":"","selector":"div.member-from","type":"SelectorText"},{"delay":0,"id":"Content","multiple":false,"parentSelectors":["link"],"regex":"","selector":"div.motion-text-inner","type":"SelectorText"},{"delay":0,"id":"link","multiple":false,"parentSelectors":["motion"],"selector":"a.overlay-link","type":"SelectorLink"}]}