0

Good day to all!

I am developing a node serverless framework application, and I'd like to know if there exists an API to fetch HTML pages from the web after a certain period of time has passed and it has been rendered by its javascript code. I thought about using selenium-webdriver or puppeteer, but they require heavy applications to be present on the machine, which AWS Lambda does not allow due to its size limits. Therefore, I'd like to simply use an API that would return the content of a URL's respective page after a specified, arbitrary amount of time has passed.

Is there such an API, or an alternative to what I'm looking for? If there is not a way to currently do this, I am interested in developing it myself.

Many thanks in advance!

2 Answers 2

0

There was an old software named "Sikuli IDE", a java based task automation software in which you could trigger some commands based on images. For example you could define commands to click wherever there is a recycle-bin icon on your desktop. Also you could take a screenshot and compare it with the previous one. The second one is a week recommendation which tries to circumvent java-script checks.

1
  • I think the OP is asking for a raw dump of the current HTML and JS of a page, after the JS has made its modifications, not a screenshot. Dec 7, 2022 at 15:48
0

Try adding something like this after the </body>:

<script>
    console.log(document.getElementsByTagName("html")[0].innerHTML)
<script>

Use Right-click — inspect (Chrome browser, others might call it something else) to see the output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.