summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-01-22 12:53:15 +0100
committerlassulus <lass@lassul.us>2017-01-22 12:53:15 +0100
commit42b3396858becd384ddc5e5f08449874a4c2649f (patch)
tree015251d87cdde7b8014c4a22030e7a750faa115a
parent8d527f99be68714ab68a09a02b8b3f06f70a7070 (diff)
k 5 Reaktor plugins url-title: timeout after 5s
-rw-r--r--krebs/5pkgs/Reaktor/plugins.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/krebs/5pkgs/Reaktor/plugins.nix b/krebs/5pkgs/Reaktor/plugins.nix
index 3e48ae3ba..d4774dd69 100644
--- a/krebs/5pkgs/Reaktor/plugins.nix
+++ b/krebs/5pkgs/Reaktor/plugins.nix
@@ -119,10 +119,10 @@ rec {
url-title = (buildSimpleReaktorPlugin "url-title" {
pattern = "^.*(?P<args>http[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 /<title.*?>\s*(.*?)(?: - youtube)?\s*<\/title/si'
fi
'';