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
This demo showcases how to use Trigger.dev with Python to build a web crawler that uses a headless browser to navigate websites and extract content.
13
+
10
14
## Prerequisites
11
15
12
16
- A project with [Trigger.dev initialized](/quick-start)
13
17
-[Python](https://www.python.org/) installed on your local machine
14
18
15
-
## Overview
16
-
17
-
This demo showcases how to use Trigger.dev with Python to build a web crawler that uses a headless browser to navigate websites and extract content.
18
-
19
19
## Features
20
20
21
21
-[Trigger.dev](https://trigger.dev) for background task orchestration
@@ -113,7 +113,10 @@ export function installPlaywrightChromium(): BuildExtension {
113
113
}
114
114
```
115
115
116
-
Learn more about the [trigger.config.ts](/config/config-file) file including setting default retry settings, customizing the build environment, and more.
116
+
<Info>
117
+
Learn more about executing scripts in your Trigger.dev project using our Python build extension
118
+
[here](/config/extensions/pythonExtension).
119
+
</Info>
117
120
118
121
### Task code
119
122
@@ -212,14 +215,14 @@ if __name__ == "__main__":
212
215
1. Create a virtual environment `python -m venv venv`
213
216
2. Activate the virtual environment, depending on your OS: On Mac/Linux: `source venv/bin/activate`, on Windows: `venv\Scripts\activate`
214
217
3. Install the Python dependencies `pip install -r requirements.txt`
215
-
4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and and add it to the `trigger.config.ts` file.
216
-
5. Run the Trigger.dev dev CLI command with with `npx trigger dev@latest dev` (it may ask you to authorize the CLI if you haven't already).
218
+
4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and add it to the `trigger.config.ts` file.
219
+
5. Run the Trigger.dev CLI `dev` command (it may ask you to authorize the CLI if you haven't already).
217
220
6. Test the task in the dashboard, using a URL of your choice.
218
221
219
222
<ScrapingWarning />
220
223
221
224
## Deploying your task
222
225
223
-
Deploy the task to production using the CLI command `npx trigger.dev@latest deploy`
226
+
Deploy the task to production using the Trigger.dev CLI `deploy` command.
0 commit comments