From 79aa64982e4ec27f5f15cf0840e8dd9fb2927d7e Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 25 Jan 2017 15:28:20 +0000 Subject: [PATCH] bin/html-table2csv --- bin/html-table2csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/html-table2csv b/bin/html-table2csv index 470e9381..e46f2fdf 100755 --- a/bin/html-table2csv +++ b/bin/html-table2csv @@ -39,7 +39,7 @@ $main::_DATA_ = undef; # BEGIN # ################################################################################# -@ARGV = map {m,^\w+://, ? "curl -s '$_'" : $_} @ARGV if @ARGV; +@ARGV = map {m,^\w+://, ? "curl -s '$_' |" : $_} @ARGV if @ARGV; my $html = join('',<>); $html =~ s/\s+/ /g; @@ -54,6 +54,7 @@ for my $table ($html =~ m,]*>(.*?)<\s*/\s*table\s*>,gi) { for my $td ($tr =~ m,]*>(.*?)<\s*/\s*t[dh]\s*>,gi) { $td = html2txt($td); + $_ = chr(194).chr(160); $td =~ s/$_/ /g; $td =~ s/\s+/ /g; $td = str_trim($td); push(@col,$td); -- 2.47.3