{"id":23773412,"url":"https://github.com/beenotung/playwright-table","last_synced_at":"2026-05-04T12:40:35.816Z","repository":{"id":64042053,"uuid":"572864200","full_name":"beenotung/playwright-table","owner":"beenotung","description":"Collect tabular data from HTML Table Elements as object array or 2D string array","archived":false,"fork":false,"pushed_at":"2023-09-07T02:36:08.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T11:17:52.531Z","etag":null,"topics":["crawl","csv","json","playwright","scrapy","table-data","typescript-library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/playwright-table","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beenotung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-01T07:36:38.000Z","updated_at":"2024-06-25T16:40:31.000Z","dependencies_parsed_at":"2023-01-14T19:46:05.822Z","dependency_job_id":null,"html_url":"https://github.com/beenotung/playwright-table","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/beenotung%2Fplaywright-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beenotung%2Fplaywright-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beenotung%2Fplaywright-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beenotung%2Fplaywright-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beenotung","download_url":"https://codeload.github.com/beenotung/playwright-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239960747,"owners_count":19725384,"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":["crawl","csv","json","playwright","scrapy","table-data","typescript-library"],"created_at":"2025-01-01T05:39:50.855Z","updated_at":"2026-04-03T02:30:21.581Z","avatar_url":"https://github.com/beenotung.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playwright-table\n\nCollect tabular data from HTML Table Elements as object array or 2D string array\n\n[![npm Package Version](https://img.shields.io/npm/v/playwright-table)](https://www.npmjs.com/package/playwright-table)\n\n## Installation\n\n```bash\nnpm install playwright-table\n```\n\n## Usage Example\n\n```typescript\nimport { collectTableWithHeaders } from 'playwright-table'\nimport { firefox } from 'playwright'\n\nasync function main() {\n  let browser = await firefox.launch()\n  let page = await browser.newPage()\n  await page.goto(\n    'https://en.wikipedia.org/wiki/List_of_airports_by_IATA_airport_code:_A',\n  )\n  await page.waitForSelector('.wikitable')\n  let rows = await collectTableWithHeaders({\n    page,\n    selector: '.wikitable',\n  })\n  console.log(rows)\n  await page.close()\n  await browser.close()\n}\nmain()\n```\n\nDetails refere to [example/main.ts](./example/main.ts)\n\n## Typescript Signature\n\n```typescript\nexport function collectTableWithHeaders\u003cKey extends string = string\u003e(input: {\n  page: Page\n  selector: string\n}): Promise\u003cRecord\u003cKey, string\u003e[] | undefined\u003e\n\nexport function collectTableWithoutHeaders(input: {\n  page: Page\n  selector: string\n}): Promise\u003cstring[][] | undefined\u003e\n\nexport function collectAllTableWithHeaders\u003cKey extends string = string\u003e(input: {\n  page: Page\n  selector: string\n  limit?: number\n}): Promise\u003cArray\u003cRecord\u003cKey, string\u003e[]\u003e\u003e\n\nexport function collectAllTableWithoutHeaders(input: {\n  page: Page\n  selector: string\n  limit?: number\n}): Promise\u003cArray\u003cstring[][]\u003e\u003e\n```\n\n## License\n\nThis project is licensed with [BSD-2-Clause](./LICENSE)\n\nThis is free, libre, and open-source software. It comes down to four essential freedoms [[ref]](https://seirdy.one/2021/01/27/whatsapp-and-the-domestication-of-users.html#fnref:2):\n\n- The freedom to run the program as you wish, for any purpose\n- The freedom to study how the program works, and change it so it does your computing as you wish\n- The freedom to redistribute copies so you can help others\n- The freedom to distribute copies of your modified versions to others\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeenotung%2Fplaywright-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeenotung%2Fplaywright-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeenotung%2Fplaywright-table/lists"}