{"id":15010789,"url":"https://github.com/shenjinti/browserlify","last_synced_at":"2025-10-04T22:03:59.109Z","repository":{"id":217637837,"uuid":"743963920","full_name":"shenjinti/browserlify","owner":"shenjinti","description":"A browser service with a REST API","archived":false,"fork":false,"pushed_at":"2024-10-20T12:53:14.000Z","size":1963,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:37:17.845Z","etag":null,"topics":["chrome","chromium","headless-chrome","rust","selenium","webdriver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shenjinti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-16T11:04:12.000Z","updated_at":"2025-03-04T06:35:17.000Z","dependencies_parsed_at":"2024-03-19T05:43:10.203Z","dependency_job_id":"1804fb67-1455-4789-bb4f-dabab70be994","html_url":"https://github.com/shenjinti/browserlify","commit_stats":null,"previous_names":["shenjinti/browserlify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Fbrowserlify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Fbrowserlify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Fbrowserlify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Fbrowserlify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenjinti","download_url":"https://codeload.github.com/shenjinti/browserlify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088404,"owners_count":21045707,"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","chromium","headless-chrome","rust","selenium","webdriver"],"created_at":"2024-09-24T19:35:56.517Z","updated_at":"2025-10-04T22:03:54.088Z","avatar_url":"https://github.com/shenjinti.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Browserlify  - browser as a service\n=======\n\nBrowserlify is a browser service:\n- Content API: Retrieve web page content by URL, supporting PDF generation, screenshot capture, text extraction, and HTML dumping.\n- Headless Chrome: Connect to Headless Chrome via WebSocket and perform testing using Puppeteer.\n- 🔥 Remote Browser: Implement a remote browser based on noVNC, allowing browser access through a web interface.\n\nWith Browserlify, you can easily access web content, automate testing with Headless Chrome, and enjoy the convenience of a remote browser.\n\n🚀 They is a  [cloud browser demo](https://browserlify.com/remote.html?from=github). 👏\n\n\n### Screenshots\n\n\u003cimg src=\"./screenshots/dashboard.png\" width=\"60%\" alt=\"Dashboard\" /\u003e\n\u003cimg src=\"./screenshots/viewer.png\" width=\"60%\" alt=\"Viewer\" /\u003e\n\n### How to run (via docker)\n```bash\nmkdir -p -m 777 `pwd`/data\ndocker run  -ti --rm --privileged  --shm-size=500m\\\n  -v `pwd`/data:/tmp/browserlify \\\n  -p 9000:9000 shenjinti/browserlify:latest\n```\n\nvisit `http://localhost:9000`\n\n### Run via cargo \u0026 puppeteer (local development)\n\u003e Note: you need to install puppeteer and rust first\n\u003e remote browser Only tested on linux\n\n```bash\n# for linux dev \n$ sudo apt-get install x11vnc xvfb scrot pkg-config libssl-dev chromium-browser \n\n# \n$ cd browserlify\n$ cargo run\n```\nTest via puppeteer\n```javascript\n  const browser = await puppeteer.connect({\n    browserWSEndpoint: `ws://localhost:9000`,\n  });\n  const page = await browser.newPage();\n  await page.goto('https://example.org');\n  await page.screenshot({ path: 'example.png' });\n```\n\n### Session API\n- `/list` - list all session\n- `/kill/:session_id` - kill session by id\n- `/kill_all` - kill all sessions\n\n### Content API\n- The parameters:\n```javascript\n{\n  \"url\": \"https://example.org\",\n\n  \"file_name\": \"example.pdf\",\n  \"timeout\": 60000, // total timeout: milliseconds\n  \"wait_load\": 1000, // wait for load: milliseconds\n  \"selector\": \"#main\", // wait for selector: css selector\n  \"images\": true, // wait for images loaded\n  \"network_idle\": 1000, // wait for network idle: milliseconds\n  \"page_ready\": true,\n  \"scroll_bottom\": 1000, // milliseconds\n  \"scroll_interval\": 1000, // milliseconds\n\n  \"paper_width\": 8.5, //pdf: inches\n  \"paper_height\": 11, //pdf: inches\n  \"scale\": 1,\n  \"margin_top\": 0.4, // inches\n  \"margin_bottom\": 0.4, // inches\n  \"margin_left\": 0.4, // inches\n  \"margin_right\": 0.4, // inches\n  \"background\": true, // pdf: print background\n  \"landscape\": false, // landscape or portrait\n  \"page_ranges\": \"1-5\",  // pdf: page ranges: 1-5, 1,2,3\n  \"device\": \"ipad\",  // emulate device: iphone, ipad, 2k, 4k\n  \"disable_link\": true,  // pdf: disable link\n  \"paper_size\": \"A4\",  // pdf: paper size: A4, A3, Letter, Legal\n  \"header_template\": \"\u003cdiv\u003eHeader\u003c/div\u003e\",\n  \"footer_template\": \"\u003cdiv\u003eFooter\u003c/div\u003e\",\n  \"format\": \"png\",    // screenshot: format: png, jpeg, pdf\n  \"quality\": 100,     // screenshot: only used for jpeg format\n  \"clip\": \"0,0,800,600\",   // screenshot: clip the screenshot to the specified rectangle\n  \"full_page\": true,       // screenshot: capture the full scrollable page, not just the viewport\n  \"author\": \"Browserlify\", // pdf: author\n}\n```\n\n- `/pdf` - generate pdf from url\n```\ncurl \"http://localhost:9000/pdf?url=http://browserlify.com\u0026images=true\" \u003e browserlify.pdf\n```\n- `/screenshot` - generate screenshot from url\n```\ncurl \"http://localhost:9000/screenshot?url=http://browserlify.com\u0026format=png\u0026full_page=true\" \u003e browserlify.png\n```\n- `/text` - dump dom text from url\n```\ncurl \"http://localhost:9000/text?url=http://browserlify.com\" \u003e browserlify.txt\n```\n- `/html` - dump html content from url\n```\ncurl \"http://localhost:9000/html?url=http://browserlify.com\" \u003e browserlify.html\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenjinti%2Fbrowserlify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenjinti%2Fbrowserlify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenjinti%2Fbrowserlify/lists"}