vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
577 stars 102 forks source link

Question/Feature: Is it possible to get HTML using manet? #58

Closed tadas-subonis closed 8 years ago

tadas-subonis commented 8 years ago

I would like to use manet through its RESTful API to get HTML content of the page.

Is it possible?

vbauer commented 8 years ago

@tadas-subonis Hello, could you please provide some example? What is the difference between this and simple GET request to some URL?

tadas-subonis commented 8 years ago

If I do:

curl http://localhost:8891/?url=github.com > github.png

but I want to do:

curl http://localhost:8891/?url=github.com&format=html > page_content.html

so I would get the loaded page's HTML.

vbauer commented 8 years ago

Do you mean that curl http://github.com > page_content.html is not enough, because some of your logic on client side could modify DOM?

tadas-subonis commented 8 years ago

yeah. Like most of the pages built with angular - they load their content with JavaScript.

On Sun, May 1, 2016 at 4:50 PM, Vladislav Bauer notifications@github.com wrote:

Do you mean that curl http://github.com > page_content.html is not enough, because some of your logic on client side could modify DOM?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/vbauer/manet/issues/58#issuecomment-216043161

Kind Regards, Tadas Šubonis

vbauer commented 8 years ago

I've just added "html" format to fetch HTML data. Changes are available only in master at the current moment. Could you please check this features?

tadas-subonis commented 8 years ago

Works great :+1:

When are you planning to release it? :)

vbauer commented 8 years ago

Thank you for testing! It is already available in 0.4.15.