Customize element XPath
Updated over a week ago

XPath is a language that allows you to locate specific elements from a web page. Modifying XPath in Octoparse works very well with more flexibility and accuracy than the XPath auto-generated by clicking elements during the task configuration.

Octoparse allows you to customize the element XPath so that you can precisely locate the data you are targeting. This helps resolve any issue as data missing, page skipped, blank fields, and duplicates.


Where can I modify XPath in Octoparse?

  • Click more on the data preview for the column you'd like to customize with

8888.png
  • Select Customize XPath

877.png
  • Enter the new XPath in the Matching XPath textbox

18555.png
  • For Loop Item, Pagination or Click Item, you can find the XPath textbox under General Settings too. Enter the new XPath and click Apply to save your changes.

5599.png

How to write XPath?

If you are new to XPath, you might need to grab some basics of HTML first. XPath locates elements based on tags and attributes. So before you get down to write your own XPath, you would need to inspect the HTML structure of the page first. (More tutorials about HTML)

Did this answer your question?