Closed charsleysa closed 5 years ago
Thanks for reporting!
Fixed on next
release:
curl https://next.microlink.io/?url=https%3A%2F%2Fwww.taratahi.ac.nz%2Fprogrammes&palette=true&video=true&data.imageOverride.0.selector=.content-section+.programme-banner+img&data.imageOverride.0.attr=src&data.imageOverride.0.type=image&data.imageOverride.1.selector=img&data.imageOverride.1.attr=src&data.imageOverride.1.type=image
output
// 20180901221448
// https://next.microlink.io/?url=https%3A%2F%2Fwww.taratahi.ac.nz%2Fprogrammes&palette=true&video=true&data.imageOverride.0.selector=.content-section+.programme-banner+img&data.imageOverride.0.attr=src&data.imageOverride.0.type=image&data.imageOverride.1.selector=img&data.imageOverride.1.attr=src&data.imageOverride.1.type=image&force
{
"status": "success",
"data": {
"lang": null,
"author": null,
"title": "Taratahi | Study for rural careers in farming, dairy, sheep & beef, apiculture, horticulture, equine",
"publisher": "Taratahi",
"image": {
"url": "https://www.taratahi.ac.nz/taratahi/images/taratahi-logo.png",
"width": 435,
"height": 183,
"type": "png",
"size": 24731,
"size_pretty": "24.7 kB"
},
"description": "Get a rewarding career agriculture with Taratahi. Since 1919 Taratahi Agricultural Training Centre has led rural studies in Agricultural study on its multiple farms through out New Zealand.",
"video": null,
"audio": null,
"date": "2018-09-01T20:14:42.681Z",
"logo": {
"url": "https://www.taratahi.ac.nz/favicon.ico?v1",
"width": 16,
"height": 16,
"type": "ico",
"size": 3117,
"size_pretty": "3.12 kB"
},
"url": "https://www.taratahi.ac.nz/programmes",
"imageOverride": [
"https://www.taratahi.ac.nz/taratahi/images/taratahi-logo.png",
"https://www.taratahi.ac.nz/CMSPages/Dialogs/CaptchaImage.aspx?hash=081c9d7e-f2d0-41d5-ae9d-d4bc4cc6ed48&captcha=p_lt_ctl03_SecurityCode_captchaControl&width=80&height=20"
]
}
}
Finally shipped on production endpoint, thanks for reporting 🙂
Bug Report
Current Behavior
When a custom rule returns multiple values it doesn't resolve URLs to be absolute.
Expected behavior/code
Here's an example of an custom rule for images which uses the same last resort selector as the default image rule.
returns (take note of the difference between the first result of
imageOverride
andimage
, they both point to the same image)