https://github.com/moriyoshi/obake
Obake is a frontend of some web browser implementations out there. (pre-alpha)
https://github.com/moriyoshi/obake
Last synced: 2 months ago
JSON representation
Obake is a frontend of some web browser implementations out there. (pre-alpha)
- Host: GitHub
- URL: https://github.com/moriyoshi/obake
- Owner: moriyoshi
- License: mit
- Created: 2013-01-06T00:48:45.000Z (over 12 years ago)
- Default Branch: develop
- Last Pushed: 2013-06-03T15:03:09.000Z (almost 12 years ago)
- Last Synced: 2025-03-07T02:49:07.232Z (2 months ago)
- Language: Python
- Size: 367 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
Obake
=====What is this?
-------------Obake is a frontend of some web browser implementations out there.
::
from obake.config import UserAgentConfiguration
from obake.driver.macosx.webkit import Driver
import time
import xpath
d = Driver()
def entrypoint(ua):
uac = UserAgentConfiguration()
ua = ua.create_user_agent(uac)def callback(e):
d = e.target.document
body = d.getElementsByTagName('body').item(0)
div = d.createElement("div")
div.appendChild(d.createTextNode("test"))
body.appendChild(div)
ua.main_frame.addEventListener('load', callback, False)ua.main_frame.load('http://example.com/')
time.sleep(10)
d.init(entrypoint)