Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rwoll/cdp-download-named-example
https://github.com/rwoll/cdp-download-named-example
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rwoll/cdp-download-named-example
- Owner: rwoll
- Created: 2020-04-30T02:02:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T02:15:29.000Z (over 3 years ago)
- Last Synced: 2024-10-07T14:51:19.592Z (about 1 month ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
1. Download Code and Dependencies:
```
$ git clone [email protected]:rwoll/cdp-download-named-example.git
$ cd cdp-download-named-example
$ npm i
```2. Start Chrome
```
$ # Assumes you are on macOS and in the cdp-download-named-example directory
$ ./node_modules/playwright/.local-browsers/chromium/chrome-mac/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9222
```Example Output:
```
============ Example 1 ============
Downloading http://localhost:4747/download.rar with behavior allow
Begin Event: {"frameId":"2F10D0290E7498145C0C17E2B88FDE4E","guid":"929aded9-c6ba-460c-b81e-b916ab8b833f","url":"http://localhost:4747/download.rar"}
Final Event: {"guid":"929aded9-c6ba-460c-b81e-b916ab8b833f","totalBytes":13,"receivedBytes":13,"state":"completed"}
Downloaded Files: ["example.rar"]============ Example 2 ============
Downloading http://localhost:4747/download.rar with behavior allowAndName
Begin Event: {"frameId":"2F10D0290E7498145C0C17E2B88FDE4E","guid":"916c3a6e-d60d-47f6-81cd-ae103af0c2d4","url":"http://localhost:4747/download.rar"}
Final Event: {"guid":"916c3a6e-d60d-47f6-81cd-ae103af0c2d4","totalBytes":13,"receivedBytes":13,"state":"completed"}
Downloaded Files: ["916c3a6e-d60d-47f6-81cd-ae103af0c2d4"]
```