Skip to content

Commit 06088b4

Browse files
committed
roll puppeteer-extra-plugin-stealth back
1 parent 3110b82 commit 06088b4

File tree

4 files changed

+10
-332
lines changed

4 files changed

+10
-332
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
cd work-fonts
6464
git clone --depth=1 https://github.com/dev-protocol/stackroom.git
6565
cd stackroom/fonts
66-
mv IBM_Plex_Sans_JP/IBMPlexSansJP-Bold.ttf ./
66+
mv IBM_Plex_Sans_JP/* ./
6767
rm -rf IBM_Plex_Sans_JP
6868
mv Noto_Color_Emoji/* ./
6969
rm -rf Noto_Color_Emoji

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
"license": "MPL-2.0",
1616
"dependencies": {
1717
"@sparticuz/chromium": "^132.0.0",
18-
"puppeteer-core": "^24.2.0",
19-
"puppeteer-extra": "^3.3.6",
20-
"puppeteer-extra-plugin-stealth": "^2.11.2"
18+
"puppeteer-core": "^24.2.0"
2119
},
2220
"devDependencies": {
2321
"@eslint/js": "^9.12.0",

src/libs/chromium.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
import type { Browser, PuppeteerLaunchOptions } from 'puppeteer-core'
2-
import puppeteer from 'puppeteer-extra'
3-
import StealthPlugin from 'puppeteer-extra-plugin-stealth'
4-
5-
// eslint-disable-next-line functional/no-expression-statements
6-
puppeteer.use(StealthPlugin())
1+
import type { Browser, LaunchOptions } from 'puppeteer-core'
2+
import puppeteer from 'puppeteer-core'
73

84
export const Chromium = (() => {
9-
const instances: WeakMap<PuppeteerLaunchOptions, Browser> = new WeakMap()
5+
const instances: WeakMap<LaunchOptions, Browser> = new WeakMap()
106

11-
const createInstance = (options: PuppeteerLaunchOptions) => {
7+
const createInstance = (options: LaunchOptions) => {
128
// eslint-disable-next-line functional/no-expression-statements
139
console.log('&&&&&', 'new chromium instanse will be created')
1410
return puppeteer.launch(options)
1511
}
1612

1713
return {
18-
getInstance: async (options: PuppeteerLaunchOptions) => {
14+
getInstance: async (options: LaunchOptions) => {
1915
const fromCache = instances.get(options)
2016
const instance = fromCache
2117
? fromCache

0 commit comments

Comments
 (0)