From 42b3396858becd384ddc5e5f08449874a4c2649f Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 22 Jan 2017 12:53:15 +0100 Subject: k 5 Reaktor plugins url-title: timeout after 5s --- krebs/5pkgs/Reaktor/plugins.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/Reaktor/plugins.nix b/krebs/5pkgs/Reaktor/plugins.nix index 3e48ae3b..d4774dd6 100644 --- a/krebs/5pkgs/Reaktor/plugins.nix +++ b/krebs/5pkgs/Reaktor/plugins.nix @@ -119,10 +119,10 @@ rec { url-title = (buildSimpleReaktorPlugin "url-title" { pattern = "^.*(?Phttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$$"; - path = with pkgs; [ wget perl ]; + path = with pkgs; [ curl perl ]; script = pkgs.writeDash "lambda-pl" '' if [ "$#" -gt 0 ]; then - exec wget -qO- "$1" | + curl -SsL --max-time 5 "$1" | perl -l -0777 -ne 'print $1 if /\s*(.*?)(?: - youtube)?\s*<\/title/si' fi ''; -- cgit v1.2.3