Q: What if I want to extract particular values in the drop-down menu?

 

A:

Sometimes I just want to extract data from some of choices, instead of all the choices, in a drop-down list in a web page.


In Octoparse, you can just manually change the loop mode - the “Fixed list” in the advanced options under the “Loop Item”, and enter the XPaths of those particular choices you want.


(Note: For how to get the XPaths of these particular choice from a drop-down list, please check out these tutorial: Getting started with XPath 1)


Suppose you only want to extract data from the second and the fourth item in a drop-donw list. See the screenshot below.


You can follow the steps shown in the picture - choose "Fixed list" under the "Loop mode" and enter the Xpath of these two items in the textbox.

In most cases, if you get the XPath of an item in a drop-donw list, you only need to change the location number of the item you want when entering XPath of target items.

btn_sidebar_use.png
btn_sidebar_form.png