From cf7653230337beb26e5025e4dbaf5b029ba49cb8 Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Wed, 27 Jan 2016 00:09:16 +0100 Subject: [PATCH] fixed http404, updated copylefts --- Org.pm | 34 +++++++++++++++------------------- README | 10 +++------- leo | 14 +++++++------- t/run.t | 2 +- 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Org.pm b/Org.pm index da90545..552fe92 100644 --- a/Org.pm +++ b/Org.pm @@ -1,13 +1,13 @@ # -# Copyleft (l) 2000-2014 Thomas Linden . -# 2014 Thomas von Dein . +# Copyleft (l) 2000-2016 Thomas v.D. . +# # leo may be # used and distributed under the terms of the GNU General Public License. # All other brand and product names are trademarks, registered trademarks # or service marks of their respective holders. package WWW::Dict::Leo::Org; -$WWW::Dict::Leo::Org::VERSION = 1.39; +$WWW::Dict::Leo::Org::VERSION = 1.40; use strict; use warnings; @@ -211,20 +211,18 @@ Accept-Language: en_US, en\r\n); croak "proxy auth required or access denied!\n"; } else { - croak "got HTTP error $err!\n"; + if ($site =~ /Leider konnten wir zu Ihrem Suchbegriff/ || + $site =~ /found no matches for your search/ + ) { + return (); + } + else { + croak "got HTTP error $err!\n"; + } } } } - if ($site =~ /produced\s+no\s+results\s+for\s+the\s+selected/ - || $site =~ /Die\s+Suche\s+nach.*lieferte\skeine/) { - return (); - } - - #$site =~ s/(]*>)/\n$1\n/g; - #$site =~ s/(<\/table[^>]*>)/\n$1\n/g; - #print $site; - my @request = ( { id => 2, @@ -526,16 +524,14 @@ L =head1 COPYRIGHT -WWW::Dict::Leo::Org - -Copyright (c) 2007-2014 by Thomas Linden -Copyright (c) 2014 by Thomas von Dein +WWW::Dict::Leo::Org - Copyright (c) 2007-2016 by Thomas v.D. L - -Copyright (c) 1995-2014 LEO Dictionary Team. +Copyright (c) 1995-2016 LEO Dictionary Team. =head1 AUTHOR -Thomas Linden +Thomas v.D. =head1 HOW TO REPORT BUGS @@ -545,6 +541,6 @@ Please don't forget to add debugging output! =head1 VERSION -1.39 +1.40 =cut diff --git a/README b/README index dce46db..5a0b552 100644 --- a/README +++ b/README @@ -36,17 +36,13 @@ HISTORY COPYRIGHT - WWW::Dict::Leo::Org - Copyright (c) 2007-2014 by Thomas Linden - - leo - Copyright (c) 2000-2014 by Thomas Linden + WWW::Dict::Leo::Org + leo + Copyright (c) 2007-2016 by Thomas v.D. http://dict.leo.org/ - Copyright (c) 1995-2014 LEO Dictionary Team. + Copyright (c) 1995-2016 LEO Dictionary Team. The search results returned by leo are based on the work of the people at LEO.org. Thanks for the great work. -Thomas Linden. diff --git a/leo b/leo index f2718c6..33792cd 100755 --- a/leo +++ b/leo @@ -10,12 +10,12 @@ # # $Id: leo,v 1.33 2008/04/22 22:23:39 scip Exp $ # -# Copyleft (l) 2000-2014 by Thomas Linden . leo may be +# Copyleft (l) 2000-2016 by Thomas v.D. . leo may be # used and distributed under the terms of the GNU General Public License. # All other brand and product names are trademarks, registered trademarks # or service marks of their respective holders. -use lib qw(blib/lib); +#use lib qw(blib/lib); #use Org; use utf8; @@ -298,8 +298,8 @@ foreach my $section (@match) { print "$copy_c" if $highlight; print "\n Fetched by leo $version via http://dict.leo.org/"; -print "\n Copyright (C) LEO Dictionary Team 1995-2014"; -print "\n [leo] GPL Copyleft Thomas Linden 2000-2014\n\n"; +print "\n Copyright (C) LEO Dictionary Team 1995-2016"; +print "\n [leo] GPL Copyleft Thomas v.D. 2000-2016\n\n"; print "$default_c" if $highlight; @@ -589,7 +589,7 @@ the password will be read from STDIN. =head1 AUTHOR -Thomas Linden . +Thomas v.D. =head1 BUGS @@ -607,9 +607,9 @@ to me, thanks. =head1 COPYRIGHT -B copyleft 2000-2014 Thomas Linden. All rights reserved. +B copyleft 2000-2016 Thomas v.D.. All rights reserved. -http://dict.leo.org/ copyright (c) 1995-2014 LEO Dictionary Team. +http://dict.leo.org/ copyright (c) 1995-2016 LEO Dictionary Team. The search results returned by B are based on the work diff --git a/t/run.t b/t/run.t index 3d91515..9f8a64a 100644 --- a/t/run.t +++ b/t/run.t @@ -1,5 +1,5 @@ # -*-perl-*- -# testscript for WWW::Dict::Leo::Org Class by Thomas Linden +# testscript for WWW::Dict::Leo::Org Class by Thomas v.D. use Test::More qw(no_plan);