All Collections
Advanced Tools
XPath & Regular Expression
Fix field issues (missing, blank or misplaced fields)
Fix field issues (missing, blank or misplaced fields)
Updated over a week ago

When you run tasks, 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.

Here is the data we need:

misaligned4.png

Here is the data output - note that the highlighted data is not being extracted correctly:

misaligned5.png

How to fix it?

To ensure that data will always be extracted correctly to the corresponding data fields, you need to write a new XPath that will always pinpoint the right data on all pages. To do this, refer to our tutorial on how to write an 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 and select Customize XPath

1.png

STEP 2. Enter the new XPath and Apply the setting

88.png

In some cases, we might find that data can be extracted in the Data Preview but not so after we run the task, then we can try:

  • Set up Page scroll settings to fully load the target items before scraping

  • Add Wait time if the target data takes a bit of time to be fully loaded, like images

  • If the content is private, check if the login steps fail or if the cookies get expired

Did this answer your question?