Fix the XPath query (did it worked by accident or was XKCD recently changed?) - plumb - Open certain URL patterns with an ad-hoc opener (plumber) (HTM) hg clone https://bitbucket.org/iamleot/plumb (DIR) Log (DIR) Files (DIR) Refs (DIR) README --- (DIR) changeset 2d18bf3f3f8c6a451579751b40ef243349265b4a (DIR) parent 8b19b187ccbc34e6b5ff1f32c397468d6c4bda91 (HTM) Author: Leonardo Taccari <iamleot@gmail.com> Date: Tue, 25 Sep 2018 13:41:02 Fix the XPath query (did it worked by accident or was XKCD recently changed?) Diffstat: openers/xkcd | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff -r 8b19b187ccbc -r 2d18bf3f3f8c openers/xkcd --- a/openers/xkcd Tue Sep 25 13:20:01 2018 +0200 +++ b/openers/xkcd Tue Sep 25 13:41:02 2018 +0200 @@ -2,7 +2,7 @@ for u in "$@"; do pngurl=$(curl -gs -L "$u" | - xmllint --html --xpath 'string(//div[@id="comic"]/img/@src)' - 2>/dev/null | + xmllint --html --xpath 'string(//div[@id="comic"]//img/@src)' - 2>/dev/null | sed 's;^//;https://;' ) plumb "${pngurl}" done