Config and Advanced Options

A monitor’s Config contains parameters in JSON format. The parameters are used to extract monitored content from a webpage.

How to view config?

You can navigate to the config of a monitor from the “Options” window. Here are the steps that you can follow to go to config:

  1. Click on the “down caret” icon for a Monitor to view quick action items.

  2. Click on the “Edit Options”. This will open the Options window. Quick action items for a Monitor

  3. Click on the “down caret” icon located under Source and click on “Show config” as shown below: Button to view config of a Monitor

Config parameters

When a monitor is added, Distill creates a config automatically. Following are the parameters in the config with a default value. You can change the default value to match your requirements.

  1. index: Generated by default. Its value is based on selection. For selection inside an iframe, the index should match with that of iframe’s index.
  2. excludes: List of selectors for excluded selections.
  3. includes: List of selectors for included selections.
  4. type: It can take any of three values depending on the selector type: “CSS”, “XPath” or “JS”. The default selector is CSS (XPath for browser extension).
  5. expr: Selector expression for the selected or excluded text.
  6. dynamic: It can be either set to “true” or “false”. True value loads dynamic content of webpages while false does not.
  7. delay: Distill waits for the delay period before checking a page for a change. By default, it is set to 2. It can take values from 0 to 20. It is in seconds.
  8. ignoreEmptyText: By default, it is set to true. In this case, when the selected element does not contain any text, it registers as error with error code “SELECTION_EMPTY” in the error-log. If you would like to consider empty text as a change, set it to false .
  9. includeStyle: It is false by default. If it is set to true, it will include the webpage’s stylesheet in extracted data.

How to wait for a page to finish loading before extracting content?

Sometimes, web pages or specific sections of a page may take longer to load. If monitored using the default settings, Distill may not be able to find the content during its check, resulting in incomplete or erroneous data. To address this issue, you can increase the delay setting in the monitor’s config. This will instruct Distill to wait for the specified delay time (in seconds) while the page’s content loads before checking it. You can test out with different delay values and check what works best for that page.

To set a delay:

  1. Open the monitor’s config as mentioned above.
  2. Search for the delay parameter. It has a default value of 2 or 0 depending on the device.
  3. Change delay to some higher number (10 or 12) up to 20 and save the config.
    Config with delay highlighted]

How to make changes in the config in bulk?

You can use the Batch Edit feature to update the config of multiple monitors at once.

Here are the steps that you can follow:

  1. Select the monitors for which you want to apply the new config.
  2. Click on Batch Edit -> config.
  3. Paste the new config and save.

Option to Batch Edit config

Was this article helpful? Leave a feedback here.