scraglehtml - HTML of javascript based web page

scraglehtml load given web page, scroll down a number of times and wait until javascript loaded, then save HTML.

Algorithmia Platform License
apl
· Internet Access

This algorithm has Internet access.

This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.
· Calls Other Algorithms

This algorithm has permission to call other algorithms.

This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.

Run an Example

"{\"isError\":false,\"errorMessage\":\"Getting HTML is completed successfully!\",\"errorCode\":\"Success\",\"results\":{\"outputFile\":\"data://.algo/progragle/scraglehtml/temp/a626df0a4fd04f29872a738a05b67fd8.html\",\"injectJsFileUrl\":\"https://algorithmia.com/v1/data/progragle%2Fpublic%2Fscraglehtml-inject.js\",\"errorStream\":\"\",\"outputFileUrl\":\"https://algorithmia.com/v1/data/.algo%2Fprogragle%2Fscraglehtml%2Ftemp%2Fa626df0a4fd04f29872a738a05b67fd8.html\",\"scroll\":5,\"injectJsFile\":\"data://progragle/public/scraglehtml-inject.js\",\"outputStream\":\"\",\"cookiesFile\":\"data://.algo/progragle/scraglehtml/temp/63c131bbc5414cd38aeea01dc87201b3.cookies\",\"cookiesFileUrl\":\"https://algorithmia.com/v1/data/.algo%2Fprogragle%2Fscraglehtml%2Ftemp%2F63c131bbc5414cd38aeea01dc87201b3.cookies\"}}"

Install & Use

Use

curl -X POST -d '{
  "url": "https://www.huffingtonpost.com/entry/apple-new-iphone-x_us_59b809f9e4b027c149e2dbe0",
  "scroll": 5,
  "injectJsFile": "data://progragle/public/scraglehtml-inject.js"
}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/progragle/scraglehtml/0.1.1