Page 1 of 1

In webbrow.prg to display the text on the website?

Posted: Sun Dec 24, 2017 9:17 am
by Eugene Lutsenko
In webbrow.prg or Xb2net to obtain the text displayed on the window, in the value of a variable?

***** Получить текст сайта, используя HTTP (GetWeb.prg, Boris Borzic)
oHttp := xbHTTPClient():new()
oHttp:Transport := VIA_WININET
oResponse := oHttp:Execute( 'http://translate.yandex.ru/?lang=ru-en& ... 0%B8%D1%80!' )
mABC = oResponse:Content
StrFile(mABC, 'WebsiteTranslator.txt')

For some reason the translation is not contained in the received code from the site. A word for translation it is.

How to programmatically get the translated file from a translator online?

Re: In webbrow.prg to display the text on the website?

Posted: Wed Dec 27, 2017 10:20 pm
by Eugene Lutsenko
Hey, Boris!

There is a possibility to programmatically go to the website (I know it's not a problem), and then get in a text file what is displayed on the screen?

=========================================================================

Hi Eugene,

Have a look at the GETWEB.PRG sample included with Xb2.NET - it shows how to download a file from a website.

=========================================================================

Thank You, Boris!

That's what I watched. Here is the problem. When I turn to online translator and look so html text page, it is translatable text, but not translated. And on the screen it is.

Re: In webbrow.prg to display the text on the website?

Posted: Thu Dec 28, 2017 2:41 am
by c-tec
Hello,
look at the HTML code, the translator can only find text if it is correct embedded in the HTML code. Otherwise you have to modify the code before translating.
regards
Rudolf

Re: In webbrow.prg to display the text on the website?

Posted: Sat Dec 30, 2017 10:39 am
by Eugene Lutsenko