Selectors: Extracting multiple rows of data into individual table columns

Questions & Answers about Helium Scraper 3
Post Reply
yeti
Posts: 22
Joined: Sat Feb 02, 2013 1:01 am

Selectors: Extracting multiple rows of data into individual table columns

Post by yeti » Sun Jan 30, 2022 3:28 pm

I am collecting specific data from eBay listings. In this case I am figuring out how to save multiple item image URL's from the main listing itself.

Selecting one of the images, highlights ALL of the images as one selector, which when previewed - lists each individual and unique image URL in it's own row (see attachment).

If I extract this to the table, it only extracts the first row.

I would like to extract each of these URL's into columns in the table, such as 'image2' 'image3' 'image4' etc...

Is there a method to save each row as an individual column in the table, or as a separate table?

Alternatively, I have found that each image does have it's own unique attributes, however I can't seem to make it select each image as a unique individual selector, it always selects all images. The unique attributes per image are: index="0" index="1" index="2" etc... and also alt="thumbnail 2" alt="thumbnail 3" alt="thumbnail 4" etc...

If I could define each image as it's own unique selector via one of these, then I can extract each one individually instead. Can I add these to the selectors by modifying them?

Thank you! :mrgreen:
Attachments
heliumimages.jpg
heliumimages.jpg (202.53 KiB) Viewed 12340 times

webmaster
Site Admin
Posts: 521
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Re: Selectors: Extracting multiple rows of data into individual table columns

Post by webmaster » Wed Feb 02, 2022 9:52 pm

You can do this using a single selector that selects all images. But note that the columns must be already defined (they cannot be created dynamically at run-time). Since each column will always extract the first item selected by the selector, you can use Sequence.Skip to skip images like this:

Code: Select all

extract
   image0
      Sequence.Skip
         ·  0
         ·  Select.Images
      Gather.Src
   image1
      Sequence.Skip
         ·  1
         ·  Select.Images
      Gather.Src
   image2
      Sequence.Skip
         ·  2
         ·  Select.Images
      Gather.Src
Here, image0 will contain the first image (since it's skipping 0 images), image1 the second one, and so on.
Juan Soldi
The Helium Scraper Team

yeti
Posts: 22
Joined: Sat Feb 02, 2013 1:01 am

Re: Selectors: Extracting multiple rows of data into individual table columns

Post by yeti » Sun Feb 06, 2022 10:31 am

Working perfectly now. Thank you again, Juan!

Post Reply