Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/conduitry/cloudflare-playwright
https://github.com/conduitry/cloudflare-playwright
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/conduitry/cloudflare-playwright
- Owner: Conduitry
- License: mit
- Created: 2022-07-21T12:41:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-07T14:00:07.000Z (about 1 year ago)
- Last Synced: 2023-09-07T15:24:54.475Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudflare-playwright
A simple tool to deal with the "Checking your browser before accessing [site]." interstitials from Cloudflare.
## Usage
This uses Playwright to visit the site, waits for the Cloudflare scripts to do their thing and for the `cf_clearance` cookie to be created, and then outputs the headers that should be set on future requests for automated access.
It can be run with the Playwright browser dependencies installed natively on your system, or with the Playwright Docker image.
### Natively
```shell
npm install
npx playwright install-deps firefox
npx playwright install firefox
```Then:
```shell
node . example.com
```### With Docker
```shell
npm install
```Then:
```shell
./cloudflare-playwright.sh example.com
```## License
[MIT](LICENSE)