You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier, and more robust! Download and upgrade here if you haven't already done so!

eBay is a multinational e-commerce company located in the U.S., facilitating consumer-to-consumer and business-to-consumer sales through its website. It is one of the most famous and used e-commerce platforms worldwide.

This tutorial will show you how to scrape images' URLs from the eBay product detail page.

eBay_0012.jpg

To follow through, you might want to use the URL below:

https://www.ebay.com/b/SCUBA-Snorkeling-Masks/71161/bn_1973279

Here are the main steps in this tutorial: [Download task file here]

  1. Create a Go to Web Page - to open the target website

  2. Create Pagination Loop - to scrape data from multiple listing pages

  3. Create a Page Scroll down - to load the data on each page fully

  4. Create a Loop Item - to loop click on each product link and enter the detail page

  5. Extract data - to extract the images' URLs

  6. Run the task - to get your target data


1. Create a Go to Web Page - to open the target website

  • Enter the target URL on the homepage of Octoparse and click Start

eBay_0013.jpg

2. Create a Pagination Loop - to scrape data from multiple listing pages

  • Scroll to the bottom of the webpage

  • Click the Next page button (>)

  • Click Loop click a single URL in the Tips

eBay_0010.jpg
  • Set AJAX timeout: 7-10s recommended

eBay_0009.jpg

Note: If you want to learn more about AJAX and how Octoparse handles it, please check it out here.


3. Create a Page Scroll down - to load the data on each page fully

  • Click the Add Step button (+) in the workflow > Loop

eBay_0008.jpg
  • Set the Loop Mode as Scroll Page

  • Tick Scroll for one screen

  • Set Repeats time as 15

  • Click Apply

eBay_0007.jpg

4. Create a Loop Item - to loop click on each product link and enter the detail page

  • Click on the name of the first product

  • Click Select all in the Tips

eBay_0006.jpg
  • Choose Loop click each element in the coming Tips

eBay_0005.jpg

NOTE: To make the loop more accurate, we need to modify the XPath of the Loop Item.

  • Click Loop Item

  • Set the Loop Mode as Variable List

  • Input the matching XPath as: //ul[@class="b-list__items_nofooter srp-results srp-grid"]/li//a[@class="s-item__link"]

  • Click Apply to save the change

eBay_0000.jpg


5. Extract data - to extract the images' URLs

  • Click the first image on the sidebar

  • Click Select all in the Tips

eBay_0004.jpg
  • Click Extract image URLs

eBay_0003.jpg
  • Click the More button next to the data field

  • Choose Merge multiple rows of data into one

eBay_0002.jpg

Note: This Merge multiple rows of data into one helps you to get all the images of one product into one cell. If you want to scrape them into different rows, you don't need to tick them. For scraping images into different columns, you may refer to Capture images from a carousel


6. Run the task - to get your target data

  • Click Save on the upper right to save your task

  • Click Run next to it and wait for a Run Task window to pop up

  • Select Run on your device to run the task on your local device

  • Wait for the task to complete

Here is the sample output from a local run:

eBay_0014.jpg
Did this answer your question?