From: bw1 Date: Mon, 4 Jan 2021 10:07:44 +0000 (+0100) Subject: [chansearch] update web page filter X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d4c42b35a33de5d3768034acd6eb6a14c73625f6;p=irssi-scripts.irssi.org.git [chansearch] update web page filter --- diff --git a/scripts/chansearch.pl b/scripts/chansearch.pl index 9de92e4..40184c0 100644 --- a/scripts/chansearch.pl +++ b/scripts/chansearch.pl @@ -5,7 +5,7 @@ use strict; use vars qw($VERSION %IRSSI); -$VERSION = '2.1'; +$VERSION = '2.2'; %IRSSI = ( authors => 'Stefan \'tommie\' Tomanek, bw1', contact => 'bw1@aol.at', @@ -71,7 +71,6 @@ sub draw_box ($$$$) { sub dehtml { my ($text) =@_; $text =decode_entities($text); - utf8::decode($text); $text =~ s/<.*?>//g; return $text; } @@ -82,15 +81,18 @@ sub get_entries_count { } sub html_to_list { + utf8::decode($t); while (length($t) > 0) { my %h; if ($t =~ m#(.*?)#p) { $h{channel}= dehtml($1); $' =~ m#(.*?)#p; $h{network}= dehtml($1); - $' =~ m#(.*?)#p; + #$' =~ m#(.*?)#p; + $' =~ m#Chat Room.*?(\d+).*#p; my $u=$1; - $' =~ m#class="cs-time">.*?(.*?).*?(.*?)current topic:(.*?)
#p; $t= $'; $h{topic}=dehtml($1); $u =~ m/(\d+)/;