Get all source from a web page

Having problems with building or using the JCEF Java binding? Ask your questions here.

Get all source from a web page

Postby TuanODB » Sun Mar 05, 2017 11:13 pm

Hi guys,
How can i get all rescource of a web page and save to a folder by using JCEF.
Example, i want to get all rescource from Google like this:
Attachments
gg.png
gg.png (48.52 KiB) Viewed 5227 times
TuanODB
Newbie
 
Posts: 4
Joined: Fri Mar 03, 2017 4:44 am

Re: Get all source from a web page

Postby Czarek » Mon Mar 06, 2017 3:09 pm

In CEF there is CefRequestHandler.OnResourceResponse callback with which you could easily intercept all resources being loaded. However this is not exposed in java-cef. You can still do the same using CefRequestHandler.GetResourceHandler, however that would require implementing CefResourceHandler and use for example CefURLRequest, it's a lot of code.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Get all source from a web page

Postby TuanODB » Mon Mar 06, 2017 10:03 pm

Thank you man!
TuanODB
Newbie
 
Posts: 4
Joined: Fri Mar 03, 2017 4:44 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 19 guests