Magic URLs

Magic URL are non-static URLs. Those locators are processed by Leankoala before they are checked. A magic URL can for example point to another document on a different server that returns an URL pointing to the most visited page of an editorial website. That way it is possible to monitor the most visited website of the day or the newest documents.

The magic URL feature will always be a work in progress and is extended constantly. Magic URLs can only be used for components.

date

The date directive injects a date string into the URL. It can, for example, be used to check websites that have the current (or any other) date in the path.

Syntax

@https://www.leankoala.com/en/tip-of-the-day/{date(format, dateString)}

Examples

@https://www.leankoala.com/en/tip-of-the-day/{date('Y-m-d', 'today')}
@https://www.leankoala.com/en/tip-of-the-day/{date('Y-m-d', 'sunday next week')}

For more information about the format please read: https://secure.php.net/manual/en/function.date.php

For more information about the dateString please read: https://secure.php.net/manual/en/function.strtotime.php

from

The from directive is used to fetch an URL that is pointing to another URL.

Url

The URL handler takes an URL as a parameter. The given URL must return a single URL.

Syntax

@{from(url, https://example.com/path/documentWithUrl.txt, lineNumber)}

Example

@{from(url, http://tests.koalamon.com/pointto.php, 1)}

Sitemap

The sitemap handler takes a sitemap XML file and takes one single element out it. Using this magic URL you are able to always monitor the newest articles on your system.

Syntax

@{from(sitemap, https://example.com/path/sitemap.xml, elementNumber)}

Examples

@{from(sitemap, https://www.leankoala.com/sitemap.xml, 1)}

RSS feed

The RSS feed handler takes an RSS feed and takes a single element out of it. Like the sitemap handler, it allows to always monitor the newest posts. 

Syntax

@{from(rss, https://example.com/feed, elementNumber)}

Example

@{from(rss, https://blog.leankoala.com/feed, 1)}

XPath selector

The XPath selector allows to select an URL that can be found on a given page behind an XPath.

Synatx

@{from(xpath, https://www.example.com, "xpath", elementNumber)}

Example

@{from(xpath, https://www.leankoala.com/de, "//a/@href", 5)}

Regular expression

The regular expression is applied to the DOM of a given URL. 

Synatx

@{from(regex, url, regEx, elementNumber)}

Example

@{from(regex, https://www.example.de/, "^var shortLink = '(.*?)'^", 1)}
Table of contents