Headless, scriptable Firefox/Webkit on linux? [closed]

旧城冷巷雨未停 提交于 2019-11-27 10:36:49
Dmitry

I did related task with IE embedded browser (although it was gui application with hidden browser component panel). Actually you can take any layout engine and cut output logic. Navigation is should be done via firing script-like events.

You can use Crowbar. It is headless version of firefox (Gecko engine). It turns browser into RESTful server that can accept requests ("fetch url"). So it parse html, represent it as DOM, wait defined delay for all script performed.

It works on linux. I suppose you can easily extend it for your goal using JS and rich XULrunner abilities.

What about phantomjs?

Have you tried Selenium? It will allow you to record a usage scenario, using an extension for Firefox, which can later be played back using a number of different methods.

Edit: I just realized this was a very late response. :)

Have a look at WebKitDriver. The project includes headless implementation of WebKit.

I don't know how to do flash interactions (and am also interested), but for html/javascript you can use Chickenfoot.

And to get a headless + scriptable browser working on Linux you can use the Qt webkit library. Here is an example use.

To accomplish this, I just write Chrome extensions that post to CouchDBs (example and its Futon). Add the Couch to the permissions in the manifest to allow cross-domain XHRs.

(I arrived at this thread in search of a headless alternative to what I've been doing; having found this thread, I'm going to try Crowbar at some point.)

Also, considering the bizarre characteristics of this website, I can't help wondering whether you can exploit some security hole to get around the Flash and Javascript.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!