3 Star 0 Fork 0

mirrors_matthew-andrews / serverless-chrome

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

serverless-chrome

Serverless Chrome contains everything you need to get started running headless Chrome on AWS Lambda (possibly Azure and GCP Functions soon).

The aim of this project is to provide the scaffolding for using Headless Chrome during a serverless function invocation. Serverless Chrome takes care of building and bundling the Chrome binaries and making sure Chrome is running when your serverless function executes. In addition, this project also provides a few example services for common patterns (e.g. taking a screenshot of a page, printing to PDF, some scraping, etc.)

Why? Because it's neat. It also opens up interesting possibilities for using the Chrome DevTools Protocol (and tools like Chromeless or Puppeteer) in serverless architectures and doing testing/CI, web-scraping, pre-rendering, etc.

CircleCI David David GitHub release

Contents

  1. Quick Start
  2. The Project
  3. Examples
  4. Documentation & Resources
    1. Building Headless Chrome/Chromium
  5. Testing
  6. Articles & Tutorials
  7. Troubleshooting
  8. Roadmap
  9. Projects & Companies using serverless-chrome
  10. Change log
  11. Contributing
  12. Prior Art
  13. License

Quick Start

"Bla bla bla! I just want to start coding!" No problem:

Using AWS Lambda, the quickest way to get started is with the Serverless-framework CLI.

First, install serverless globally (npm install -g serverless) and then:

serverless create -u https://github.com/adieuadieu/serverless-chrome/tree/master/examples/serverless-framework/aws

Then, you must configure your AWS credentials either by defining AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables, or using an AWS profile. You can read more about this on the Serverless Credentials Guide.

In short, either:

export AWS_PROFILE=<your-profile-name>

or

export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>

Then, to deploy the service and all of its functions:

npm run deploy

Further details are available in the Serverless Lambda example.

The Project

This project contains:

Examples

A collection of example functions for different providers and frameworks.

Serverless-framework

Documentation & Resources

Building Headless Chrome/Chromium

Testing

Test with npm test. Each package also contains it's own integration tests which can be run with npm run test:integration.

Articles & Tutorials

A collection of articles and tutorials written by others on using serverless-chrome

Troubleshooting

Can't get Selenium / ChromeDriver to work Make sure that the versions of serverless-chrome, chromedriver, and Selenium are compatible. More details in [#133](https://github.com/adieuadieu/serverless-chrome/issues/133#issuecomment-382743975).

Roadmap

1.1

  1. Support for Google Cloud Functions
  2. Example for Apex
  3. Example for Claudia.js

1.2

  1. DOM manipulation and scraping example handler

Future

  1. Support for Azure Functions
  2. Headless Firefox

Projects & Companies using serverless-chrome

Tell us about your project on the Wiki!

Change log

See the CHANGELOG

Contributing

OMG. Yes. Plz, halp meeee.

Prior Art

This project was inspired in various ways by the following projects:

License

serverless-chrome © Marco Lüthy. Released under the MIT license.
Authored and maintained by Marco Lüthy with help from contributors.

github.com/adieuadieu · GitHub @adieuadieu · Twitter @adieuadieu · Medium @marco.luethy

MIT License Copyright (c) 2017-2018 Marco Lüthy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_matthew-andrews/serverless-chrome.git
git@gitee.com:mirrors_matthew-andrews/serverless-chrome.git
mirrors_matthew-andrews
serverless-chrome
serverless-chrome
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891