#1 2022-07-20 02:22:58

beria
Member
Registered: 2022-07-20
Posts: 2

DOM with JS

sorry, it's google )
A question from a beginner... I have a task - for a console application to get a page on a corporate site, which is generated by js on the server.... Next, you need to parse it, get the text and images into some structure, generate a Docx file using a template, but the latter tasks are not difficult to solve...
I know lots of ways to get simple HTML in pascal (free pascal) but I can't get them.
Is it possible to get HTML that generates javascript in mORMot Framework and if so, can you suggest an example.......

Offline

#2 2022-07-20 06:41:32

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,570
Website

Re: DOM with JS

No, there is no support of DOM in mORMot. You can use either embedded Chromium or some type of headless browser to render a page.

Offline

#3 2022-07-20 10:02:40

beria
Member
Registered: 2022-07-20
Posts: 2

Re: DOM with JS

mpv wrote:

No, there is no support of DOM in mORMot. You can use either embedded Chromium or some type of headless browser to render a page.

Thanks for the reply...... My problem is that CEF4Delphi works, but is very slow and requires pulling heavy extra libraries, and phantomjs seems to have limited javascript support and just gives an error when executing even simple scripts on some pages...
Options that require the presence of a particular browser and work only through it, I do not consider because for the background task is unacceptable ...

Offline

Board footer

Powered by FluxBB