Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/cloud-offer/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Example using [Playwright](https://playwright.dev/).


```js copy
import playwright from "playwright";
import playwright from "playwright-core";

const browser = await playwright.chromium.connectOverCDP(
"wss://euwest.cloud.lightpanda.io/ws?token=TOKEN",
Expand Down
2 changes: 1 addition & 1 deletion src/content/open-source/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Try Lightpanda with [Playwright](https://playwright.dev/) by using
`chromium.connectOverCDP` to connect.

```js copy
import { chromium } from 'playwright';
import { chromium } from 'playwright-core';

// use connectOverCDP to pass the Lightpanda's CDP server address.
const browser = await chromium.connectOverCDP('ws://127.0.0.1:9222');
Expand Down
8 changes: 4 additions & 4 deletions src/content/quickstart/build-your-first-extraction-script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ results:
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const puppeteer = require('puppeteer-core');
import { lightpanda } from '@lightpanda/browser';
import puppeteer from 'puppeteer-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down Expand Up @@ -193,8 +193,8 @@ const puppeteeropts = {
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const { chromium } = require('playwright-core');
import { lightpanda } from '@lightpanda/browser';
import { chromium } from 'playwright-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You no longer need to start a local browser process because you are using the
cloud version. You can remove these parts of the script to simplify it:

```javascript
const { lightpanda } = require('@lightpanda/browser')
import { lightpanda } from '@lightpanda/browser';
```
```javascript
const lpdopts = {
Expand Down Expand Up @@ -78,7 +78,7 @@ Here is the final script using the cloud browser version:
```javascript copy
'use strict'

const puppeteer = require('puppeteer-core');
import puppeteer from 'puppeteer-core';

const puppeteeropts = {
browserWSEndpoint: 'wss://euwest.cloud.lightpanda.io/ws?token=' + process.env.LPD_TOKEN,
Expand Down Expand Up @@ -135,7 +135,7 @@ const puppeteeropts = {
```javascript copy
'use strict'

const { chromium } = require('playwright-core');
import { chromium } from 'playwright-core';

const playwrightopts = {
endpointURL: 'wss://euwest.cloud.lightpanda.io/ws?token=' + process.env.LPD_TOKEN,
Expand Down Expand Up @@ -202,4 +202,4 @@ features such as multi-context tabs and sandboxing, reach out to us at

Stuck or have questions about your use case? Book a 15-minute technical call with our team.
<br />
<Calcom />
<Calcom />
2 changes: 1 addition & 1 deletion src/content/quickstart/installation-and-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Create an `index.js` file with the following content:
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
import { lightpanda } from '@lightpanda/browser';

const lpdopts = {
host: '127.0.0.1',
Expand Down
16 changes: 8 additions & 8 deletions src/content/quickstart/your-first-test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Edit your `index.js` to connect to Lightpanda:
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const puppeteer = require('puppeteer-core');
import { lightpanda } from '@lightpanda/browser';
import puppeteer from 'puppeteer-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down Expand Up @@ -91,8 +91,8 @@ const puppeteeropts = {
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const { chromium } = require('playwright-core');
import { lightpanda } from '@lightpanda/browser';
import { chromium } from 'playwright-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down Expand Up @@ -190,8 +190,8 @@ Here’s the full `index.js` file:
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const puppeteer = require('puppeteer-core');
import { lightpanda } from '@lightpanda/browser';
import puppeteer from 'puppeteer-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down Expand Up @@ -240,8 +240,8 @@ const puppeteeropts = {
```javascript copy
'use strict'

const { lightpanda } = require('@lightpanda/browser');
const { chromium } = require('playwright-core');
import { lightpanda } from '@lightpanda/browser';
import { chromium } from 'playwright-core';

const lpdopts = {
host: '127.0.0.1',
Expand Down