Avoid sed transformation of the URL. - 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 7e9d7a84569b0ed213e6b5903a4b366a9c46c5e2 (DIR) parent 86ab2d8a03ee9956349e144ad05003a720ecd804 (HTM) Author: Leonardo Taccari <iamleot@gmail.com> Date: Tue, 12 Mar 2019 19:36:30 Avoid sed transformation of the URL. Possible `?.*' removal is handled in image opener only for the filename (removing that from the URL can be problematic!). (`:large' stripping is not handled nowhere ATM though!) Diffstat: openers/ogimage | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) --- diff -r 86ab2d8a03ee -r 7e9d7a84569b openers/ogimage --- a/openers/ogimage Wed Mar 06 18:42:35 2019 +0100 +++ b/openers/ogimage Tue Mar 12 19:36:30 2019 +0100 @@ -2,7 +2,6 @@ for u in "$@"; do imgurl=$(curl -gs -L "$u" | - xmllint --html --xpath 'string(//meta[@property="og:image"][1]/@content)' - 2>/dev/null | - sed -e 's/\?.*$//' -e 's/:large$//' ) + xmllint --html --xpath 'string(//meta[@property="og:image"][1]/@content)' - 2>/dev/null) plumb "${imgurl}" done