WG - web get

WG: web get (retrieve and parse text, rss and other content from HTTP links)

Syntax

wg([url], filter, params)

Arguments

  • url: Url to the http content
  • filter: Filter to use (RSS, TXT, XML, URL etc?)
  • params: Filter parameters (see examples)

Examples

FormulaDescription
$wg("goo.gl/wNMV3f", txt)$Convert HTML content at URL into plain Text
$wg("quotes.rest/qod.xml", xml, "//quote")$Quote of the day text (parse XPath expression for XML content at URL)
$wg("quotes.rest/qod.xml", xml, "//author")$Quote of the day author (parse XPath expression for XML content at URL)
$wg("www.cnet.com/rss/news/", rss, title)$Get RSS feed title
$wg("cnet.com/rss/news/", rss, desc)$Get RSS feed description
$df("hh:mma", wg("cnet.com/rss/news/", rss, date))$Get RSS feed publish date
$wg("cnet.com/rss/news/", rss, count)$Get RSS feed entry count
$wg("cnet.com/rss/news/", rss, 0, title)$Get RSS feed title for entry 0
$wg("cnet.com/rss/news/", rss, 0, desc)$Get RSS feed content for entry 0
$wg("cnet.com/rss/news/", rss, 0, link)$Get RSS feed link for entry 0
$wg("cnet.com/rss/news/", rss, 0, thumb)$Get RSS feed first thumbnail image for entry 0
$df("hh:mma", wg("cnet.com/rss/news/", rss, 0, date))$Get RSS feed date for entry 0
$wg("500px.com/popular.rss", url, "cdn.500px.org")$Extract first URL matching the pattern
$wg("500px.com/popular.rss", url, "cdn.500px.org", count)$Number of URLs matching the pattern
$wg("500px.com/popular.rss", url, "cdn.500px.org", 3)$Extract third URL matching the pattern
$wg(jsonip.com, json, .ip)$Current IP via public service (parse JSONPath expression)
$wg("api.ipify.org/?format=json", reg, '[\{"\}]', 'X')$Search and replace from URL using Regular Expression
$wg("file:///sdcard/test.txt", raw)$Dump content of a text file in the SD without parsing



Privacy Policy