Re: Seeking help with a Perl module for translating languages

  • From: "E.J. Zufelt" <everett@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 6 Nov 2008 19:35:17 -0400

Good evening Jamal,

I have automated a number of web-forms in the past. The only tip I can give is that it takes some trial and error. Moreover, some web-forms are protected, in part, by Javascript cookies. A process in which a cookie is generated in Javascript by the page hosting the form. The cookie must be present when the form is processed or the processing script will see your automation as a robot and not allow the form to be processed. An example of this is on the hotmail.com login page (or at least it was last I checked).

HTH,
Everett


----- Original Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, November 06, 2008 7:18 PM
Subject: RE: Seeking help with a Perl module for translating languages


Jim,
I've been meaning to thank you for your post below, and to ask how one can
figure out what parameters need to be passed to a post request in order to
automate a web form in a particular way.  How did you figure out what was
needed on those web sites?

Can you or others give general tips for this kind of scripting?

Jamal


-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Dunleavy
Sent: Wednesday, October 15, 2008 9:43 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Seeking help with a Perl module for translating languages

Hi Jamal,

I wrote a Python script that can query Yahoo Babelfish or Google
Translate.
I can post it if you are interested.

--Jim

----- Original Message -----
From: Jamal Mazrui <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, October 14, 2008 10:33 PM
Subject: Re: Seeking help with a Perl module for translating languages


Thanks for the info.  I'm looking for a programmatic way of doing a
translation, that is, a way that a program I write can control the UI
rather than depending on the UI of a web page or other desktop program.
Do you know of something that meets this criteria?

Jamal
On Tue, 14 Oct 2008,
Demetry Yousifidou wrote:

> Date: Tue, 14 Oct 2008 23:31:26 +0200
> From: Demetry Yousifidou <demetry.yousifidou@xxxxxxxxxxxxxx>
> Reply-To: programmingblind@xxxxxxxxxxxxx
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: Seeking help with a Perl module for translating
> languages
>
> Hi Jamal, try the translator from Google.com -> Language Tools or
> the web and the program from www.QuickDic.org.
> HTH.
>
> Demetry
>
> On 10/14/2008 11:23 PM, Jamal Mazrui  wrote:
> > With Perl 5.8, I am trying to use the module
> > WWW::Search::Translator, which programmatically translates text
> > between different natural
languages
> > using babel.altavista.com.
> >
> > When I run the sample code in the documentation, I get an error
> > about
a
> > missing param function.  After web searches, I found that the CGI
module
> > includes a function by that name, but using that module as well
produced
> > another error message instead.
> >
> > Can anyone help?  Below is the error message, followed by the code.
> >
> > Jamal
> >
> > Undefined subroutine &main::param called at TranLang.pl line 2.
> >
> >
> >   use WWW::Search;
> >   %opts = (
> >   lp => param(en_de),
> >   );
> >    $query = "a whole bunch of english text to be translated to
german";
> >    my $search = new WWW::Search('Translator');
> >    $search->native_query(WWW::Search::escape_query($query),\%opts);
> >   while (my $result = $search->next_result())
> >     {
> >     $p = $result->raw;
> >     print "$p";
> >     }
> >
> >
> > __________
> > View the list's information and change your settings at
> > //www.freelists.org/list/programmingblind
> >
> >
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


----------------------------------------------------------------------------
"Information in this email (including attachments) is confidential.
It is intended for receipt and consideration only by the intended
recipient.
If you are not an addressee or intended recipient, any use, dissemination,
distribution, disclosure, publication or copying of information contained
in this email is strictly prohibited.  Opinions expressed in this email
may be personal to the author and are not necessarily the opinions of the
HSE.

If this email has been received by you in error we would be grateful if
you could immediately notify the ICT Service Desk by telephone at +353 1
6352757 or by email to service.desk@xxxxxxxxxxxx and thereafter delete
this e-mail from your system"
----------------------------------------------------------------------------
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: