{"id":13519137,"url":"https://github.com/amir20/phantomjs-node","last_synced_at":"2025-12-30T04:09:26.440Z","repository":{"id":44440284,"uuid":"2493754","full_name":"amir20/phantomjs-node","owner":"amir20","description":"PhantomJS integration module for NodeJS","archived":true,"fork":false,"pushed_at":"2019-12-03T19:01:28.000Z","size":5943,"stargazers_count":3534,"open_issues_count":10,"forks_count":481,"subscribers_count":92,"default_branch":"master","last_synced_at":"2025-01-17T20:42:55.438Z","etag":null,"topics":["javascript","nodejs","phantomjs","phantomjs-process"],"latest_commit_sha":null,"homepage":"http://amirraminfar.com/phantomjs-node/","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amir20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-01T06:01:36.000Z","updated_at":"2025-01-16T22:27:58.000Z","dependencies_parsed_at":"2022-07-13T08:11:00.743Z","dependency_job_id":null,"html_url":"https://github.com/amir20/phantomjs-node","commit_stats":null,"previous_names":["sgentle/phantomjs-node"],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir20%2Fphantomjs-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir20%2Fphantomjs-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir20%2Fphantomjs-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir20%2Fphantomjs-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amir20","download_url":"https://codeload.github.com/amir20/phantomjs-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234556104,"owners_count":18851906,"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":["javascript","nodejs","phantomjs","phantomjs-process"],"created_at":"2024-08-01T05:01:54.416Z","updated_at":"2025-09-28T20:30:19.299Z","avatar_url":"https://github.com/amir20.png","language":"JavaScript","readme":"# Notice\nDevelopment on this project has been suspended due to lack of support for PhantomJs. \n\nphantom - Fast NodeJS API for PhantomJS\n========\n[![NPM](https://nodei.co/npm/phantom.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/phantom/)\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Linux Build][travis-image]][travis-url]\n[![Node Version][node-image]][node-url]\n\n\n## Super easy to use\n```js\nconst phantom = require('phantom');\n\n(async function() {\n  const instance = await phantom.create();\n  const page = await instance.createPage();\n  await page.on('onResourceRequested', function(requestData) {\n    console.info('Requesting', requestData.url);\n  });\n\n  const status = await page.open('https://stackoverflow.com/');\n  const content = await page.property('content');\n  console.log(content);\n\n  await instance.exit();\n})();\n\n```\n\nUsing Node v7.9.0+ you can run the above example with `node file.js`\n\nSee [examples](examples) folder for more ways to use this module.\n\n## Use it with npx\nYou can quickly test any website with phantomjs-node without needing to install the package.\n\n```\n$ npx phantom@latest https://stackoverflow.com/\n```\n\nThe above command is very useful to test if your website works on older browsers. I frequently use it to ensure [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills) have been installed correctly. \n\n## Deprecation warnings of PhantomJs\nIn March 2018, the owner of PhantomJS [announced](https://phantomjs.org/) suspension of development. There hasn't been any updates since. Since phantomjs-node is only a wrapper around phantomjs, then you should use it at your own risk because the underlying dependency is no longer supported. I plan to maintain this project until usage has dropped significantly.  \n\n## Installation\n\n### Node v6.x and later\nLatest version of phantom does **require Node v6.x and later**. You can install with\n```bash\n$ npm install phantom --save\n```\n\n### Node v5.x\nTo use version 3.x you need to have at least Node v5+. You can install it using\n\n```bash\n$ npm install phantom@3 --save\n```\n\n### Versions _older_ than 5.x, install with\n\n```bash\n$ npm install phantom@2 --save\n```\n\n## Documents\n- [in website](http://amirraminfar.com/phantomjs-node/#/)\n- [in github](./docs/)\n\n## Pooling\n\nCreating new phantom instances with `phantom.create()` can be slow. If\nyou are frequently creating new instances and destroying them, as a\nresult of HTTP requests for example, it might be worth creating a pool\nof instances that are re-used.\n\nSee the [phantom-pool](https://github.com/blockai/phantom-pool) module\nfor more info.\n\n## Tests\n\n  To run the test suite, first install the dependencies, then run `npm test`:\n\n```bash\n$ npm install\n$ npm test\n```\n\n## Contributing\n\n  This package is under development. Pull requests are welcomed. Please make sure tests are added for new functionalities and that your build does pass in TravisCI.\n\n## People\n\n  The current lead maintainer is [Amir Raminfar](https://github.com/amir20)\n\n  [List of all contributors](https://github.com/amir20/phantomjs-node/graphs/contributors)\n\n## License\n\n  [ISC](LICENSE.md)\n\n[npm-image]: https://img.shields.io/npm/v/phantom.svg?style=for-the-badge\n[npm-url]: https://npmjs.org/package/phantom\n[downloads-image]: https://img.shields.io/npm/dm/phantom.svg?style=for-the-badge\n[downloads-url]: https://npmjs.org/package/phantom\n[travis-image]: https://img.shields.io/travis/amir20/phantomjs-node.svg?style=for-the-badge\n[travis-url]: https://travis-ci.org/amir20/phantomjs-node\n[dependencies-image]: https://dependencyci.com/github/amir20/phantomjs-node/badge?style=for-the-badge\n[dependencies-url]: https://dependencyci.com/github/amir20/phantomjs-node\n[node-image]: https://img.shields.io/node/v/phantom.svg?style=for-the-badge\n[node-url]: https://nodejs.org/en/download/\n[codecov-image]: https://codecov.io/gh/amir20/phantomjs-node/branch/master/graph/badge.svg?style=for-the-badge\n[codecov-url]: https://codecov.io/gh/amir20/phantomjs-node\n","funding_links":[],"categories":["JavaScript","目录"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir20%2Fphantomjs-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famir20%2Fphantomjs-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir20%2Fphantomjs-node/lists"}