All Projects → iiSeymour → Chromote

iiSeymour / Chromote

Licence: mit
Simple wrapper to drive Google Chrome from Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Chromote

browserexport
backup and parse browser history databases (chrome, firefox, safari, and other chrome/firefox derivatives)
Stars: ✭ 54 (-82.52%)
Mutual labels:  google-chrome
Layoutify-for-Instagram
A Google Chrome Extension which improves the Instagram.com Layout.
Stars: ✭ 75 (-75.73%)
Mutual labels:  google-chrome
Auto Chrome 2
A program that lets you automate mundane and repetitive tasks in a proxy chrome browser. presets include Rarible and Opensea minting automation. make your own presets for anything inside chrome.
Stars: ✭ 17 (-94.5%)
Mutual labels:  google-chrome
exploration-service-worker
Let's get started with ServiceWorker
Stars: ✭ 14 (-95.47%)
Mutual labels:  google-chrome
alfred-bookmarks
bookmark search with alfred workflow written in Go
Stars: ✭ 24 (-92.23%)
Mutual labels:  google-chrome
docker-images
Docker images for Katalon Studio and other frameworks
Stars: ✭ 110 (-64.4%)
Mutual labels:  google-chrome
GoogleChromeThemeCreationGuide
Guide for creating Google Chrome Themes
Stars: ✭ 67 (-78.32%)
Mutual labels:  google-chrome
Xdebug Helper For Chrome
Easily activate PHP debugging, profiling and tracing with this Xdebug Chrome extension
Stars: ✭ 270 (-12.62%)
Mutual labels:  google-chrome
purple-pi
💜 LaTeX math wherever you want
Stars: ✭ 31 (-89.97%)
Mutual labels:  google-chrome
Chrome-Dino-Runner
🐱‍🐉 A Replica of the hidden Dinosaur Game from Chrome Browser Offline mode build using Python and PyGame.
Stars: ✭ 22 (-92.88%)
Mutual labels:  google-chrome
WWDChrome
Chrome extension which lets you watch WWDC Developer Videos in Google Chrome (thus not having to use Safari)
Stars: ✭ 18 (-94.17%)
Mutual labels:  google-chrome
1click-webpage-screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 432 (+39.81%)
Mutual labels:  google-chrome
eshteb
Reduces the anger of an Iranian when typing in the wrong language!
Stars: ✭ 42 (-86.41%)
Mutual labels:  google-chrome
rendertron
🐳 Google Rendertron Isolated in Docker container. Nginx proxy. Tracer application for Server-Side-Prerending.
Stars: ✭ 18 (-94.17%)
Mutual labels:  google-chrome
crypto-currencies-values-ext
Google Chrome extension to show crypto currencies values 💰📈
Stars: ✭ 19 (-93.85%)
Mutual labels:  google-chrome
export-all-extensions
Export name and url of all installed extensions in Google Chrome
Stars: ✭ 68 (-77.99%)
Mutual labels:  google-chrome
Overlay-Scrollbars
🎨 An overlay scrollbar customizable theme for Firefox and Chrome based browsers
Stars: ✭ 87 (-71.84%)
Mutual labels:  google-chrome
Kiosk
Allows any URL to be loaded as a fullscreen kiosk.
Stars: ✭ 293 (-5.18%)
Mutual labels:  google-chrome
Automated-Whatsapp
Automated WhatsApp replies using selenium module in Python
Stars: ✭ 23 (-92.56%)
Mutual labels:  google-chrome
alfred-chrome-history
Search your Google Chrome history in Alfred
Stars: ✭ 169 (-45.31%)
Mutual labels:  google-chrome

Chromote

Simple wrapper to drive Google Chrome from Python using the Remote Debugging Protocol 1.2 API

Installation

$ pip install chromote

API

>>> from chromote import Chromote
>>> chrome = Chromote()
>>> chrome
Chromote(host="localhost", port=9222)
>>> print chrome
[Chromote(tabs=1)]
>>> tab = chrome.tabs[0]
>>> print tab
Google - https://www.google.co.uk/
>>> print tab.url
https://www.google.co.uk/
>>> tab.reload()
'{"result":{},"id":1}'
>>> tab.set_url('https://github.com/chromote')
'{"id":2,"result":{}}'
>>> tab.set_zoom(1.2)
'{"id":1,"result":{"result":{"type":"number","value":1.2,"description":"1.2"},"wasThrown":false}}'
>>> tab.evaluate('alert("Remotey");')

Note: Google Chrome needs starting with the --remote-debugging-port=<PORT> option to be controlled remotely.

Remote Browser Control

The remote debugging port binds to localhost only so using chromote with a remote machine like a dashboard/kiosk setup will require tunneling to the machine first.

On the remote machine start Google Chrome:

$ chromium-browser <URL> --incognito --kiosk --remote-debugging-port=9222

On the local machine set up a tunnel to map the remote debugging port to 9222 on localhost:

$ ssh remote-machine -L 9222:localhost:9222

You can then drive your dashboard/kiosk machine remotely to display the content you want.

from time import sleep
from chromote import Chromote

chrome = Chromote()
tab = chrome.tabs[0]

sites = [
    'https://github.com',
    'http://stackoverflow.com',
]

while True:
    for site in sites:
        tab.set_url(site)
        sleep(30)

License

MIT Copyright (c) 2016 Chris Seymour

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].