More than one multiple selector on main page problem

I have one page that holds all data. When I create the first selector for the company names, check "multiple", it finds all company names. But when I create a second selector, also "multiple", for the URLs, it does find all URLs but they are placed on a new data row. Not next to the company name. And even in random order, so I can't just shift one column upwards to line it up.

site

This is a common issue, and you can fix it by creating a parent element (container), then creating the name and URL elements as child of that parent element. So your selector graph should look something like this:

2019-09-10_212807

The parent element should be set to Multiple, but not the child elements. For this website, you can probably set the company infoboxes as the parent. You did not provide URL or sitemap, so it's harder to diagnose.

2019-09-22_084403

Thanks for your reply! Sorry for not providing the URL but I don't want the owner to google their own site and find out it's being discussed on a scraper forum :slight_smile:

In your image, what does city_v2 do? Is it neccessary or can you have the listing_selector under root directly?

And listing_selector is the parent element (container), right? What type is it? If I set it as text, it scrapes all the text in the container but I cannot link name_v2 etc under it. I can only do that when the listing_selector is a link but then it doesn't scrape the text anymore.

But wait, if I obfuscate the url that might be safer. Meanwhile I'm scraping another site with the same problem:

offshore-energy[dot]biz[forward slash]exhibitor-list

Hi yes, in that example, listing_selector is the parent element (container). It would be type: Element. It is not meant to scrape data; the actual scrapers are all child elements under it.

Using the "offshore-energy" example, here's a sitemap with a parent selectors and child scrapers.You will need to change the startUrl:

{"_id":"offshore","startUrl":["https:// secret offshore-energy website"],"selectors":[{"id":"Exhibitor selectors","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.exh_box_inner","multiple":true,"delay":0},{"id":"Company","type":"SelectorText","parentSelectors":["Exhibitor selectors"],"selector":"span.exh_item_name","multiple":false,"regex":"","delay":0},{"id":"Desc","type":"SelectorText","parentSelectors":["Exhibitor selectors"],"selector":"span.exh_item_desc","multiple":false,"regex":"","delay":0},{"id":"Stand","type":"SelectorText","parentSelectors":["Exhibitor selectors"],"selector":"div:nth-of-type(1) span.exh_item_info_output","multiple":false,"regex":"","delay":0}]}