Skip to content

Commit b7ac60c

Browse files
committed
Fix shopify template
1 parent e743b56 commit b7ac60c

File tree

4 files changed

+93
-175
lines changed

4 files changed

+93
-175
lines changed

python-examples/e-commerece-shopify/Intuned.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"metadata": {
1616
"template": {
1717
"name": "e-commerece-shopify",
18-
"description": "Shopify store product scraper"
18+
"description": "Shopify store product scraper",
19+
"tags": ["web-scraping", "shopify", "e-commerce", "api-based"]
1920
},
2021
"defaultRunPlaygroundInput": {
2122
"apiName": "shopify-list",

python-examples/e-commerece-shopify/README.md

Lines changed: 44 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
Shopify store scraper to list all products and fetch detailed product information from any Shopify store using the JSON API.
44

5-
## Run on Intuned
5+
## Key Features
6+
7+
- **Shopify JSON API Integration**: Uses Shopify's public JSON API endpoints for efficient data extraction
8+
- **Pagination Support**: Automatically handles pagination to scrape all products from large stores
9+
- **Zero Browser Overhead**: API-based scraping without browser automation overhead
10+
- **Detailed Product Data**: Extracts comprehensive product information including variants, images, and pricing
611

7-
Open this project in Intuned by clicking the button below.
12+
<!-- IDE-IGNORE-START -->
13+
## Run on Intuned
814

9-
<a href="https://app.intuned.io?repo=https://github.com/Intuned/cookbook/tree/main/python-examples/e-commerece-shopify" target="_blank" rel="noreferrer"><img src="https://cdn1.intuned.io/button.svg" alt="Run on Intuned"></a>
15+
[![Run on Intuned](https://cdn1.intuned.io/button.svg)](https://app.intuned.io?repo=https://github.com/Intuned/cookbook/tree/main/python-examples/e-commerece-shopify)
1016

1117
## Getting Started
1218

@@ -26,107 +32,60 @@ After installing dependencies, `intuned` command should be available in your env
2632

2733
### Run an API
2834
```bash
29-
# List all products from Shopify store
3035
uv run intuned run api shopify-list .parameters/api/shopify-list/default.json
31-
32-
# Get detailed product information
3336
uv run intuned run api shopify-details .parameters/api/shopify-details/default.json
3437
```
3538

36-
### Deploy project
39+
### Save project
3740
```bash
38-
uv run intuned deploy
41+
uv run intuned run save
3942
```
4043

44+
Reference for saving project [here](https://docs.intunedhq.com/docs/02-features/local-development-cli#use-runtime-sdk-and-browser-sdk-helpers)
4145

42-
46+
### Deploy project
47+
```bash
48+
uv run intuned deploy
49+
```
4350

4451
### `intuned-browser`: Intuned Browser SDK
4552

4653
This project uses Intuned browser SDK. For more information, check out the [Intuned Browser SDK documentation](https://docs.intunedhq.com/automation-sdks/overview).
4754

55+
<!-- IDE-IGNORE-END -->
56+
4857

4958

5059

5160
## Project Structure
52-
The project structure is as follows:
5361
```
5462
/
55-
├── api/ # Your API endpoints
56-
│ ├── shopify-list.py # API to list all products from a Shopify store
57-
│ └── shopify-details.py # API to fetch detailed product information
58-
└── Intuned.jsonc # Intuned project configuration file
63+
├── .parameters/ # Test parameters for APIs
64+
│ └── api/
65+
│ ├── shopify-list/
66+
│ │ └── default.json
67+
│ └── shopify-details/
68+
│ └── default.json
69+
├── api/ # API endpoints
70+
│ ├── shopify-list.py # List all products from Shopify store
71+
│ └── shopify-details.py # Get detailed product information
72+
├── Intuned.jsonc # Intuned project configuration
73+
└── pyproject.toml # Python project dependencies
5974
```
6075

6176

62-
## `Intuned.jsonc` Reference
63-
```jsonc
64-
{
65-
// Your Intuned workspace ID.
66-
// Optional - If not provided here, it must be supplied via the `--workspace-id` flag during deployment.
67-
"workspaceId": "your_workspace_id",
68-
69-
// The name of your Intuned project.
70-
// Optional - If not provided here, it must be supplied via the command line when deploying.
71-
"projectName": "your_project_name",
72-
73-
// Replication settings
74-
"replication": {
75-
// The maximum number of concurrent executions allowed via Intuned API. This does not affect jobs.
76-
// A number of machines equal to this will be allocated to handle API requests.
77-
// Not applicable if api access is disabled.
78-
"maxConcurrentRequests": 1,
79-
80-
// The machine size to use for this project. This is applicable for both API requests and jobs.
81-
// "standard": Standard machine size (6 shared vCPUs, 2GB RAM)
82-
// "large": Large machine size (8 shared vCPUs, 4GB RAM)
83-
// "xlarge": Extra large machine size (1 performance vCPU, 8GB RAM)
84-
"size": "standard"
85-
}
86-
87-
// Auth session settings
88-
"authSessions": {
89-
// Whether auth sessions are enabled for this project.
90-
// If enabled, "auth-sessions/check.ts" API must be implemented to validate the auth session.
91-
"enabled": true,
92-
93-
// Whether to save Playwright traces for auth session runs.
94-
"saveTraces": false,
95-
96-
// The type of auth session to use.
97-
// "API" type requires implementing "auth-sessions/create.ts" API to create/recreate the auth session programmatically.
98-
// "MANUAL" type uses a recorder to manually create the auth session.
99-
"type": "API",
100-
101-
102-
// Recorder start URL for the recorder to navigate to when creating the auth session.
103-
// Required if "type" is "MANUAL". Not used if "type" is "API".
104-
"startUrl": "https://example.com/login",
105-
106-
// Recorder finish URL for the recorder. Once this URL is reached, the recorder stops and saves the auth session.
107-
// Required if "type" is "MANUAL". Not used if "type" is "API".
108-
"finishUrl": "https://example.com/dashboard",
109-
110-
// Recorder browser mode
111-
// "fullscreen": Launches the browser in fullscreen mode.
112-
// "kiosk": Launches the browser in kiosk mode (no address bar, no navigation controls).
113-
// Only applicable for "MANUAL" type.
114-
"browserMode": "fullscreen"
115-
}
116-
117-
// API access settings
118-
"apiAccess": {
119-
// Whether to enable consumption through Intuned API. If this is false, the project can only be consumed through jobs.
120-
// This is required for projects that use auth sessions.
121-
"enabled": true
122-
},
123-
124-
// Whether to run the deployed API in a headful browser. Running in headful can help with some anti-bot detections. However, it requires more resources and may work slower or crash if the machine size is "standard".
125-
"headful": false,
126-
127-
// The region where your Intuned project is hosted.
128-
// For a list of available regions, contact support or refer to the documentation.
129-
// Optional - Default: "us"
130-
"region": "us"
131-
}
132-
```
77+
## APIs
78+
79+
| API | Description |
80+
|-----|-------------|
81+
| `shopify-list` | Lists all products from a Shopify store using pagination. Extracts product handles, titles, and basic information via Shopify's JSON API |
82+
| `shopify-details` | Fetches comprehensive product details including variants, images, pricing, and availability for a specific product |
83+
84+
85+
## Learn More
86+
87+
- [Intuned Documentation](https://docs.intunedhq.com)
88+
- [Intuned Browser SDK](https://docs.intunedhq.com/automation-sdks/overview)
89+
- [Shopify API Documentation](https://shopify.dev/docs/api)
90+
- [Web Scraping Recipe](https://docs.intunedhq.com/docs/01-learn/recipes/)
91+

typescript-examples/e-commerece-shopify/Intuned.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"metadata": {
1616
"template": {
1717
"name": "e-commerece-shopify",
18-
"description": "Shopify store product scraper"
18+
"description": "Shopify store product scraper",
19+
"tags": ["web-scraping", "shopify", "e-commerce", "api-based"]
1920
},
2021
"defaultRunPlaygroundInput": {
2122
"apiName": "shopify-list",

typescript-examples/e-commerece-shopify/README.md

Lines changed: 45 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
Shopify store scraper to list all products and fetch detailed product information from any Shopify store using the JSON API.
44

5-
## Run on Intuned
5+
## Key Features
6+
7+
- **Shopify JSON API Integration**: Uses Shopify's public JSON API endpoints for efficient data extraction
8+
- **Pagination Support**: Automatically handles pagination to scrape all products from large stores
9+
- **Zero Browser Overhead**: API-based scraping without browser automation overhead
10+
- **Detailed Product Data**: Extracts comprehensive product information including variants, images, and pricing
611

7-
Open this project in Intuned by clicking the button below.
12+
<!-- IDE-IGNORE-START -->
13+
## Run on Intuned
814

9-
<a href="https://app.intuned.io?repo=https://github.com/Intuned/cookbook/tree/main/typescript-examples/e-commerece-shopify" target="_blank" rel="noreferrer"><img src="https://cdn1.intuned.io/button.svg" alt="Run on Intuned"></a>
15+
[![Run on Intuned](https://cdn1.intuned.io/button.svg)](https://app.intuned.io?repo=https://github.com/Intuned/cookbook/tree/main/typescript-examples/e-commerece-shopify)
1016

1117
## Getting Started
1218

@@ -30,122 +36,73 @@ yarn
3036
3137

3238
### Run an API
33-
3439
```bash
35-
# List all products from Shopify store
3640
# npm
3741
npm run intuned run api shopify-list .parameters/api/shopify-list/default.json
42+
npm run intuned run api shopify-details .parameters/api/shopify-details/default.json
3843

3944
# yarn
4045
yarn intuned run api shopify-list .parameters/api/shopify-list/default.json
46+
yarn intuned run api shopify-details .parameters/api/shopify-details/default.json
47+
```
4148

42-
# Get detailed product information
49+
### Save project
50+
```bash
4351
# npm
44-
npm run intuned run api shopify-details .parameters/api/shopify-details/default.json
52+
npm run intuned run save
4553

4654
# yarn
47-
yarn intuned run api shopify-details .parameters/api/shopify-details/default.json
55+
yarn intuned run save
4856
```
4957

58+
Reference for saving project [here](https://docs.intunedhq.com/docs/02-features/local-development-cli#use-runtime-sdk-and-browser-sdk-helpers)
59+
5060
### Deploy project
5161
```bash
5262
# npm
5363
npm run intuned deploy
5464

5565
# yarn
5666
yarn intuned deploy
57-
5867
```
5968

60-
61-
62-
6369
### `@intuned/browser`: Intuned Browser SDK
6470

6571
This project uses Intuned browser SDK. For more information, check out the [Intuned Browser SDK documentation](https://docs.intunedhq.com/automation-sdks/overview).
6672

73+
<!-- IDE-IGNORE-END -->
74+
6775

6876

6977

7078
## Project Structure
71-
The project structure is as follows:
7279
```
7380
/
74-
├── api/ # Your API endpoints
75-
│ ├── shopify-list.ts # API to list all products from a Shopify store
76-
│ └── shopify-details.ts # API to fetch detailed product information
77-
└── Intuned.jsonc # Intuned project configuration file
81+
├── .parameters/ # Test parameters for APIs
82+
│ └── api/
83+
│ ├── shopify-list/
84+
│ │ └── default.json
85+
│ └── shopify-details/
86+
│ └── default.json
87+
├── api/ # API endpoints
88+
│ ├── shopify-list.ts # List all products from Shopify store
89+
│ └── shopify-details.ts # Get detailed product information
90+
├── Intuned.jsonc # Intuned project configuration
91+
└── package.json # Node.js project dependencies
7892
```
7993

8094

81-
## `Intuned.jsonc` Reference
82-
```jsonc
83-
{
84-
// Your Intuned workspace ID.
85-
// Optional - If not provided here, it must be supplied via the `--workspace-id` flag during deployment.
86-
"workspaceId": "your_workspace_id",
87-
88-
// The name of your Intuned project.
89-
// Optional - If not provided here, it must be supplied via the command line when deploying.
90-
"projectName": "your_project_name",
91-
92-
// Replication settings
93-
"replication": {
94-
// The maximum number of concurrent executions allowed via Intuned API. This does not affect jobs.
95-
// A number of machines equal to this will be allocated to handle API requests.
96-
// Not applicable if api access is disabled.
97-
"maxConcurrentRequests": 1,
98-
99-
// The machine size to use for this project. This is applicable for both API requests and jobs.
100-
// "standard": Standard machine size (6 shared vCPUs, 2GB RAM)
101-
// "large": Large machine size (8 shared vCPUs, 4GB RAM)
102-
// "xlarge": Extra large machine size (1 performance vCPU, 8GB RAM)
103-
"size": "standard"
104-
}
105-
106-
// Auth session settings
107-
"authSessions": {
108-
// Whether auth sessions are enabled for this project.
109-
// If enabled, "auth-sessions/check.ts" API must be implemented to validate the auth session.
110-
"enabled": true,
111-
112-
// Whether to save Playwright traces for auth session runs.
113-
"saveTraces": false,
114-
115-
// The type of auth session to use.
116-
// "API" type requires implementing "auth-sessions/create.ts" API to create/recreate the auth session programmatically.
117-
// "MANUAL" type uses a recorder to manually create the auth session.
118-
"type": "API",
119-
120-
121-
// Recorder start URL for the recorder to navigate to when creating the auth session.
122-
// Required if "type" is "MANUAL". Not used if "type" is "API".
123-
"startUrl": "https://example.com/login",
124-
125-
// Recorder finish URL for the recorder. Once this URL is reached, the recorder stops and saves the auth session.
126-
// Required if "type" is "MANUAL". Not used if "type" is "API".
127-
"finishUrl": "https://example.com/dashboard",
128-
129-
// Recorder browser mode
130-
// "fullscreen": Launches the browser in fullscreen mode.
131-
// "kiosk": Launches the browser in kiosk mode (no address bar, no navigation controls).
132-
// Only applicable for "MANUAL" type.
133-
"browserMode": "fullscreen"
134-
}
135-
136-
// API access settings
137-
"apiAccess": {
138-
// Whether to enable consumption through Intuned API. If this is false, the project can only be consumed through jobs.
139-
// This is required for projects that use auth sessions.
140-
"enabled": true
141-
},
142-
143-
// Whether to run the deployed API in a headful browser. Running in headful can help with some anti-bot detections. However, it requires more resources and may work slower or crash if the machine size is "standard".
144-
"headful": false,
145-
146-
// The region where your Intuned project is hosted.
147-
// For a list of available regions, contact support or refer to the documentation.
148-
// Optional - Default: "us"
149-
"region": "us"
150-
}
151-
```
95+
## APIs
96+
97+
| API | Description |
98+
|-----|-------------|
99+
| `shopify-list` | Lists all products from a Shopify store using pagination. Extracts product handles, titles, and basic information via Shopify's JSON API |
100+
| `shopify-details` | Fetches comprehensive product details including variants, images, pricing, and availability for a specific product |
101+
102+
103+
## Learn More
104+
105+
- [Intuned Documentation](https://docs.intunedhq.com)
106+
- [Intuned Browser SDK](https://docs.intunedhq.com/automation-sdks/overview)
107+
- [Shopify API Documentation](https://shopify.dev/docs/api)
108+
- [Web Scraping Recipe](https://docs.intunedhq.com/docs/01-learn/recipes/)

0 commit comments

Comments
 (0)