Q: What if I want to extract particular values in the drop-down menu?
Solutions are available for a related question here. Go to have a check now!
A:
Sometimes I just want to extract data from some of choices, instead of all the choices, in a drop-down list on 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 choices from a drop-down list, please check out this tutorial: Getting started with XPath 1)
Suppose you only want to extract data from the second and the fourth item in a drop-down 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-down list, you only need to change the location number of the item you want when entering XPath of target items.