Unable to get scrapped data into 1 line per record

Hi,

I followed the tutorial, create an element selector and put all scrapping selectors under this element. However, the scrapped data does not come in 1 element selector per record or line. All the scrapped results returned in different lines on its own. I tried different settings for the element selector but am still unsuccessful. The site map is below and can anyone please help?

{"_id":"my_web_scrape","startUrl":["https://www.ausbt.com.au/earn-virgin-australia-velocity-points-on-ola-rideshare-journeys#comments"],"selectors":[{"id":"user","type":"SelectorText","parentSelectors":["myelement"],"selector":"h3 a","multiple":true,"regex":"","delay":0},{"id":"myelement","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.comment-post-container","multiple":true,"delay":0},{"id":"post","type":"SelectorText","parentSelectors":["myelement"],"selector":"div.comment-content","multiple":true,"regex":"","delay":0},{"id":"DateTime","type":"SelectorText","parentSelectors":["myelement"],"selector":"div:nth-of-type(n+5) time","multiple":true,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":["myelement"],"selector":".text-green-lemon span.number","multiple":true,"regex":"","delay":0},{"id":"dislikes","type":"SelectorText","parentSelectors":["myelement"],"selector":".text-red-tangy span.number","multiple":true,"regex":"","delay":0}]}

Thanks muchly,
Lobbie

Hi!

This morning I ran into a similar problem. Results in separate lines instead in one.
I tried to find a solution on this forum but then I figured it out myself.

First for Lobbie:
I see many "multiple:true" in your site map. This will create more lines in the table.
Try simply removing "multiple" in all selectors except the elements selector.

For others with more complicated cases.
Try with "Text" selector, click "select", when the new line with the "Done selecting!" button appears click on the "Enable key events", then select whatever text item you want to scrap and pres "P" on your keyboard. This will select all similar entries around it. Then click "Done selecting!" and make sure you don't check "multiple". This will create one cell in the table with all the text in it. Depending on the site, you will or you will not get spaces between texts that are clearly separated on the web page. Ideally you would want separate cells in the same line without having to create different selectors for items, whose number and content you cannot predict. But I don't know, if this is possible.

Regards,
Martin

2 Likes

Hi,

I made all child selectors to be not multiple and it worked.

Thanks a lot!