You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/extensions/lightpanda.mdx
+10-15Lines changed: 10 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,15 @@ import { lightpanda } from "@trigger.dev/build/extensions/lightpanda";
17
17
18
18
exportdefaultdefineConfig({
19
19
project: "<project ref>",
20
-
// Your other config settings...
21
20
build: {
22
21
extensions: [lightpanda()],
23
22
},
24
23
});
25
24
```
26
25
27
-
###Options
26
+
## Options
28
27
29
-
-`version`: The version of the browser to install. Default: `"nightly"`.
28
+
-`version`: The version of the browser to install. Default: `"latest"`.
30
29
-`disableTelemetry`: Whether to disable telemetry. Default: `false`.
31
30
32
31
For example:
@@ -48,18 +47,14 @@ export default defineConfig({
48
47
});
49
48
```
50
49
51
-
### Environment variables
50
+
##Development
52
51
53
-
The extension sets the following environment variables during the build:
52
+
When running in dev, you will first have to download the Lightpanda browser binary and make sure it's in your `PATH`. See [Lightpanda's installation guide](https://lightpanda.io/docs/getting-started/installation).
54
53
55
-
-`LIGHTPANDA_BROWSER_PATH`: Set to `/usr/bin/lightpanda` so the browser can be found at runtime
54
+
## Next steps
56
55
57
-
#### Development
58
-
59
-
When running in dev, you will first have to download the Lightpanda browser binary. See [Lightpanda's installation guide](https://lightpanda.io/docs/getting-started/installation).
60
-
61
-
Then, set the `LIGHTPANDA_BROWSER_PATH` environment variable to the path of the Lightpanda browser binary.
Proxies can be used with your browser via the proxy query string parameter. By default, the proxy used is "datacenter" which is a pool of shared datacenter IPs.
92
-
`datacenter` accepts an optional `country` query string parameter, an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
`datacenter` accepts an optional `country` query string parameter which is an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
A session is alive until you close it or the connection is closed. The max time duration of a session is 15 min.
101
-
102
104
103
-
## Example \#2 - Get a webpage using Lightpanda
104
-
105
-
Using the Lightpanda binary we will dump the HTML for a provided URL.
106
-
You will have to pass the URL as a payload when triggering the task.
105
+
A session is alive until you close it or the connection is closed. The max duration of a session is 15 minutes.
107
106
107
+
## Using Lightpanda browser directly
108
108
109
109
### Prerequisites
110
+
110
111
- Setup the [Lightpanda build extension](/config/extensions/lightpanda)
111
112
112
-
### Task
113
+
### Get the HTML of a webpage
114
+
115
+
This task will dump the HTML of a provided URL using the Lightpanda browser binary. You will have to pass the URL as a payload when triggering the task.
0 commit comments