Q: How to use XPath in Octoparse?

A:

It depends on what kinds of data you want to extract.

1. Fixed Value

If you want to change the XPath of the item to precisely locate the value you want. You could just click the fixed value field you want to customize under the “Extract Data” tag. And choose “Customize Field” and “Define ways to locate an item”. Then you could enter the XPath in the “Matching XPath” text box.


 

2. Loop Item

If you want to manually change the XPath of the loop item, you could click the loop item box and then enter the Xpath in the text box under "Loop mode" in the "Advanced Options".

 

3. Missing Data or Extra Data

In the loop process, not all details are provided by all the items. If you want to precisely locate the information you want, you could change the relative XPath of the item.

Also, you need to click the value you want to customize under the “Extract Data” in the “Loop Item” tag. And then choose “Customize Field” and “Define ways to locate an item”.

Then you could enter the XPath in the “Relative XPath” text box.

Click Modify XPath Manually in Octoparse to know more about how to manually change XPath in particular occasions.

btn_sidebar_use.png
btn_sidebar_form.png
当社ウェブサイトは、利便性、品質維持・向上を目的に、Cookieを使用しております。詳しくはプロキシーをご確認ください。Cookieの利用に同意頂ける場合は、「同意する」ボタンを押してください。同意頂けない場合は、ブラウザを閉じて閲覧を中止してください。
同意する 閉じる