Step-by-step tutorials for you to get started with web scraping

Download Octoparse

Data fetched to the incorrect data fields

Friday, September 21, 2018

When you set a completed task to run locally or in the cloud, you may have data extracted to the wrong "columns" or not being extracted at all. This is likely due to incorrect XPath failing to locate the correct data and extract it. 

Here’s an example of data fetched to the incorrect data fields. 

This is the data we need - 

data not scrapped right

And this is the data output.  Notice all the highlighted data are not being extracted correctly.

data not scraped right

 

How to fix it?

To ensure that data will always be extracted correctly to the corresponding data fields, you want to write a new XPath that will always pinpoint the right data on all pages. To do this, refer to our step-by-step tutorial on how to locate the element with XPath. Alternatively, if you are extracting name-value pairs, check out how to associate data with nearby text

Once you have the new XPath, follow the steps below to update the XPath. 

Step 1. Select the data field that needs to be fixed, click the icon for "Customize data field"

data misaligned

 

Step 2. Click "Customize XPath"

data not scrapped right

Step 3. Change the XPath to the new one

data not scrapped right

 

If this is still not working right?
Send us a message we’ll get back to you with the answers you need within 24 hours. 

 

 

Download Octoparse to start web scraping or contact us for any
question about web scraping!

Contact us Download
btn_sidebar_use.png
btn_sidebar_form.png