====== Array CheckPages ====== Used to check the availability of the various pages before running the task. May be considered as a property of the root object, or a property of one of the Item objects ===== Structure ===== "CheckPages":[ { "Page":"", "ExpectedIP":"", "IncludedText":"", "UserAgent":"" }, { "Page":"", "ExpectedIP":"", "IncludedText":"", "UserAgent":"" }, ... { "Page":"", "ExpectedIP":"", "IncludedText":"", "UserAgent":"" } ] ==== Attributes ==== ^ Attribute ^ Use ^ Presence ^ ||verifiable page |Required| ||alleged IP host page|Optional | ||text which contained in the page source code |Optional | ||User-agent, is used to download the source code of the checked page|Optional | ===== Description ===== If non-empty array CheckPages was detected in an external source , then before the task will be executed, the availability of pages will be checked in accordance with the elements of the array. Checking of pages is executing in several stages: - If the host where the page located is available. - If the host IP coincides with aExpectedIP or aExpectedIP and equal '0.0.0.0'. - If AIncludedText not empty string, the source code of the page is loaded using aUserAgent (redirects are not supported!). If aUserAgent is empty, then used User-agent, installed for your browser. If the source code of the page contains aIncludedText or aIncludedText - empty string. No more than five first pages will checked. If the checking at **each** stage is successful, the task continues to execute, otherwise the task is terminated. ===== Examples ===== - { "Items":[ ... ], "CheckPages":[ { "Page":"habrahabr.ru" } ] } - { "Items":[ ... ], "CheckPages":[ { "Page":"habrahabr.ru", "ExpectedIP":"178.248.233.33" } ] } - { "Items":[ { ... "CheckPages":[ { "Page":"habrahabr.ru", "ExpectedIP":"178.248.233.33" } ] ... } ] }