Update of /cvsroot/blootbot/blootbot/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1901/src/Modules
Modified Files:
babelfish.pl
Log Message:
urltext now trtext
Index: babelfish.pl
===================================================================
RCS file: /cvsroot/blootbot/blootbot/src/Modules/babelfish.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- babelfish.pl 18 Feb 2005 03:07:04 -0000 1.3
+++ babelfish.pl 7 Apr 2005 05:02:37 -0000 1.4
@@ -14,6 +14,7 @@
use strict;
my $no_babelfish;
+my $url = 'http://babelfish.av.com/tr';
BEGIN {
eval "use URI::Escape"; # utility functions for encoding the
@@ -67,9 +68,7 @@
$ua->agent("Mozilla/5.0 " . $ua->agent);
$ua->timeout(5);
- my $req =
- #HTTP::Request->new('POST', 'http://babelfish.altavista.com/raging/translate.dyn');
- HTTP::Request->new('POST', 'http://babelfish.altavista.com/babelfish/tr');
+ my $req = HTTP::Request->new('POST', $url);
# babelfish ignored this, but it SHOULD work
# Accept-Charset: iso-8859-1
@@ -86,9 +85,9 @@
my ($phrase, $languagepair, $req, $ua) = @_;
&::DEBUG("translate($phrase, $languagepair, $req, $ua)");
- my $urltext = uri_escape($phrase);
- $req->content("urltext=$urltext&lp=$languagepair");
- &::DEBUG("http://babelfish.altavista.com/babelfish/tr??urltext=$urltext&lp=$languagepair");
+ my $trtext = uri_escape($phrase);
+ $req->content("trtext=$trtext&lp=$languagepair");
+ &::DEBUG("$url??trtext=$trtext&lp=$languagepair");
my $res = $ua->request($req);
my $translated;
|