{"id":13419700,"url":"https://github.com/iiSeymour/chromote","last_synced_at":"2025-03-15T05:32:46.149Z","repository":{"id":24431205,"uuid":"27832719","full_name":"iiSeymour/chromote","owner":"iiSeymour","description":"Simple wrapper to drive Google Chrome from Python","archived":false,"fork":false,"pushed_at":"2021-07-20T20:42:39.000Z","size":21,"stargazers_count":317,"open_issues_count":8,"forks_count":34,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-10-14T06:42:50.130Z","etag":null,"topics":["chrome-debugging-protocol","google-chrome","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iiSeymour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-10T18:09:53.000Z","updated_at":"2024-02-29T22:28:36.000Z","dependencies_parsed_at":"2022-07-10T11:16:16.419Z","dependency_job_id":null,"html_url":"https://github.com/iiSeymour/chromote","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiSeymour%2Fchromote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiSeymour%2Fchromote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiSeymour%2Fchromote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiSeymour%2Fchromote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iiSeymour","download_url":"https://codeload.github.com/iiSeymour/chromote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221548054,"owners_count":16840960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome-debugging-protocol","google-chrome","python"],"created_at":"2024-07-30T22:01:19.547Z","updated_at":"2024-10-26T15:30:21.973Z","avatar_url":"https://github.com/iiSeymour.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Chromote\n\nSimple wrapper to drive Google Chrome from Python using the [Remote Debugging Protocol 1.2 API](https://chromedevtools.github.io/devtools-protocol/1-2)\n\n## Installation\n\n    $ pip install chromote\n\n## API\n\n```python\n\u003e\u003e\u003e from chromote import Chromote\n\u003e\u003e\u003e chrome = Chromote()\n\u003e\u003e\u003e chrome\nChromote(host=\"localhost\", port=9222)\n\u003e\u003e\u003e print chrome\n[Chromote(tabs=1)]\n\u003e\u003e\u003e tab = chrome.tabs[0]\n\u003e\u003e\u003e print tab\nGoogle - https://www.google.co.uk/\n\u003e\u003e\u003e print tab.url\nhttps://www.google.co.uk/\n\u003e\u003e\u003e tab.reload()\n'{\"result\":{},\"id\":1}'\n\u003e\u003e\u003e tab.set_url('https://github.com/chromote')\n'{\"id\":2,\"result\":{}}'\n\u003e\u003e\u003e tab.set_zoom(1.2)\n'{\"id\":1,\"result\":{\"result\":{\"type\":\"number\",\"value\":1.2,\"description\":\"1.2\"},\"wasThrown\":false}}'\n\u003e\u003e\u003e tab.evaluate('alert(\"Remotey\");')\n```\n\nNote: Google Chrome needs starting with the `--remote-debugging-port=\u003cPORT\u003e` option to be controlled remotely.\n\n## Remote Browser Control\n\nThe remote debugging port binds to localhost only so using chromote with a remote\nmachine like a dashboard/kiosk setup will require tunneling to the machine first.\n\nOn the remote machine start Google Chrome:\n\n    $ chromium-browser \u003cURL\u003e --incognito --kiosk --remote-debugging-port=9222\n\nOn the local machine set up a tunnel to map the remote debugging port to 9222 on localhost:\n\n    $ ssh remote-machine -L 9222:localhost:9222\n\nYou can then drive your dashboard/kiosk machine remotely to display the content you want.\n\n```python\nfrom time import sleep\nfrom chromote import Chromote\n\nchrome = Chromote()\ntab = chrome.tabs[0]\n\nsites = [\n    'https://github.com',\n    'http://stackoverflow.com',\n]\n\nwhile True:\n    for site in sites:\n        tab.set_url(site)\n        sleep(30)\n```\n\n## License\n\nMIT Copyright (c) 2016 Chris Seymour\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiiSeymour%2Fchromote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FiiSeymour%2Fchromote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiiSeymour%2Fchromote/lists"}