The task periodically tyrit dynamic content from another site. The problem is that the content is generated by javascript. So far, from potential J4P5 solutions. Maybe there is another way? And will J4P5 help in my case?

  • It is logical to assume that this javascript does not take data from the air, but they are stored somewhere. It is possible that they are requested by ajax, and this can greatly simplify the task. - KoVadim
  • Alas, ajax is not there ... in the header there is a connection of several js-files, judging by the names of minified and merged into one. In place of the table, there is a call to the script that generates it. - MoRDa 2:51 pm
  • in this case, you can use Node.js or rhino and execute this js. Perhaps it will need to finish. - KoVadim
  • @KoVadim Site someone else's. And if on it implementation changes? It will be more reliable to use Selenium or an alternative to emulate how the page is generated in the browser. - Dmitry Shevchenko
  • Yes, I understand that, unfortunately miracles are expected from me, i.e. for the coder to do everything, but the customer didn’t do anything ... I’ll try to convince) - MoRDa

1 answer 1

Use Selenium + php-webdriver , load the page you need, and then retrieve its contents with the following code:

$this->driver->findElement(WebDriverBy::tagName('html'))->getText()