viv:crawl-enqueue-url

adds an absolute URL to be crawled

Synopsis

node
	viv:crawl-enqueue-url
	(url, crawl-url);
string url;
node-set crawl-url;

Description

This extension is valid only while using the search-engine to crawl. If used in any other context, it will either be undefined or will generate an error. In the crawler, calling this function with a single arguments adds an absolute URL to be crawled. If the URL is relative, viv:url-resolve-base should be used before calling this extensions.

If this function is called with the optional second argument, the URL specified in the first parameter over-writes the node's url attribute if the URL specified in the first parameter evaluates to true. If the URL specified in the first parameter evaluates to false, the node's url attribute will remain unchanged.

Arguments

  • url: the (absolute) URL to enqueue.
  • crawl-url: a crawler XML node.

Returns

an empty nodeset and has a side effect of changing the crawl queue.