[webkit-gtk] WebkitGtk2 How to save *original* source html/text of a website?

Carlos Garcia Campos cgarcia at igalia.com
Sat May 20 03:56:00 PDT 2017


El vie, 19-05-2017 a las 15:24 -0400, Leo Ufimtsev escribió:
> Hello, 
> 
> I'm working on Eclipse-SWT's webkit2 port.
> 
> On webkit2:
> I'm trying to just grab the text/html of a website, such that it is
> as close to the original html.
> 
> I tried:
> webkit_web_view_save (..) 
> but it produces an MHTML that is different from the original. For
> example '<script>' tags are stripped out.
> 
> With webkit1 we did it via:
> source =
> webkit_web_frame_get_data_source(webkit_web_view_get_main_frame(webvi
> ew);
> data = webkit_web_data_source_get_data(source)
> 
> But on Webkit2 these functions don't exist anymore.
> 
> I haven't tried: webkit_web_resource_get_data() yet. (Does that do it
> differently or same as view_save()?).
> 
> Any suggestions/snippets/advice?

Yes, the equivalent in WebKit2 is webkit_web_resource_get_data().

> Thank you
> 
> 
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
-- 
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 224 bytes
Desc: This is a digitally signed message part
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20170520/50c9fbeb/attachment.bin>


More information about the webkit-gtk mailing list