I am using ruby to download a complete web page using typhoeus, but it downloads only HTML,
request = Typhoeus::Request.new(
"www.example.com",
method: :get,
headers: { Accept: "text/html" }
)
response.body returns only HTML, Can I add any format to download complete webpage with its data which is being loaded via javascript? Or is there any other way to get the data?
This can't be done in a single request. You need to parse the html to find all the images required and download them
Depending on what you are doing with this, you may need to do the same for other assets on the page (eg css)