82 Commits

Author SHA1 Message Date
Tony 9fbfa27398 feat: update base image to trixie (#21919) 2026-06-12 12:49:04 +08:00
Tony cfcdc34e1f refactor: replace playwright with patchright (#21976)
* refactor: use patchwright

* refactor: migrate setRequestInterception and waitUntil

* fix: overwrite ua

* refactor: drop puppeteer cookie/requestfinished shims

Migrate page.cookies/setCookie and browser.cookies/setCookie call sites to the native context APIs (page.context().cookies/addCookies), rewrite requestfinished handlers to await request.response() instead of consuming the synchronous puppeteer-shaped payload, and remove the now-redundant browser.close context-cleanup wrapper. Playwright already handles all of these natively; the shims existed only for the puppeteer -> playwright migration.

* refactor: remove page.authenticate, page.setUserAgent,  browser.newPage(), browser.userAgent() shims

update cookie utility tests

* refactor: replace browser instance with context in Playwright usage across multiple routes

- Updated all instances of `browser` to `context` in Playwright-related functions for consistency and improved resource management.
- Ensured proper closure of context after operations to prevent memory leaks.
- Adjusted request interception methods to utilize the new context variable.

* fix: direct type import

* refactor: remove Puppeteer compatibility layers and unify page handling with Playwright

* fix: test case

* chore: bump patchright to v1.60.0

* chore: pin patchright to 1.59.1

nft can't resolve browser.json due to https://github.com/microsoft/playwright/pull/40093

* chore: pin to node 24.15 for playwright

browser install on node 24.16 stucks due to https://github.com/microsoft/playwright/issues/40724

* fix: update patchright and patchright-core to version 1.60.2 and adjust minify-docker.js for compatibility

* fix: import BrowserContext from patchright
2026-06-07 02:43:20 +08:00
DIYgod 566f028aaf refactor: migrate browser automation to Playwright (#21901)
* refactor: migrate browser automation to Playwright

* ci: update browser checks for Playwright
2026-05-04 21:16:18 +08:00
Tony a64a33f132 fix(deps): patch rss-parser to support gzip (#20619) 2025-12-03 04:11:56 +08:00
Rongrong 3ede128c55 fix(route/picnob): bring back support for diygod/rsshub:chromium-bundled (#20504)
* ci(docker-release): enable ZRAM to reduce memory pressure

This should hopefully help reduce stuck build jobs. Note that this can't
completely eliminate stuck builds since this is usually caused by
synchronization issues in QEMU.

Signed-off-by: Rongrong <i@rong.moe>

* build(Dockerfile): Add support for puppeteer-real-browser

Sets CHROMIUM_EXECUTABLE_PATH on AMD64 and installs essential
dependencies.

Signed-off-by: Rongrong <i@rong.moe>

* fix(route/picnob): bring back support for diygod/rsshub:chromium-bundled

The support for puppeteer-real-browser on diygod/rsshub:chromium-bundled
was improperly implemented in 400fb1fa49 ("fix(route/picnob): use
puppeteer-real-browser to pass cf check (#20478)") and was then removed
in 2cb11d7c7e ("fix(route/picnob): support img not in slide").

With proper support for puppeteer-real-browser added to Dockerfile, this
patch brings back the support for diygod/rsshub:chromium-bundled.

This partially reverts commit 2cb11d7c7e ("fix(route/picnob): support
img not in slide").

Signed-off-by: Rongrong <i@rong.moe>

* chore(route/picnob): add myself as maintainer

This route explicitly consult CHROMIUM_EXECUTABLE_PATH from the docker
image variant `diygod/rsshub:chromium-bundled`. Since I am the author of
the image variant, add myself as one of route maintainers so that I am
mentioned when the route is broken.

Signed-off-by: Rongrong <i@rong.moe>

# Conflicts:
#	lib/routes/picnob/user.ts

---------

Signed-off-by: Rongrong <i@rong.moe>
2025-11-21 01:23:22 +08:00
Tony e3c18adc71 chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
Stephen Zhou 400fb1fa49 fix(route/picnob): use puppeteer-real-browser to pass cf check (#20478) 2025-11-14 15:32:09 +08:00
Tony d6606fc111 chore(deps): update bbob packages to version 4.3.1 and clean up patches (#20323)
* chore(deps): update @bbob packages to version 4.3.1 and clean up patches

* fix: ensure Docker logs command does not fail the workflow

* fix: simplify Dockerfile cleanup step by removing entire lib directory
2025-10-18 05:35:49 +08:00
Tony b1c74bd3e3 chore: add back minify docker again (#20304)
* Revert "chore: minify docker (#18914)"

This reverts commit e9013a2313.

* Reapply "chore: minify docker (#18914)"

This reverts commit b16a021f0c.

* fix(minify-docker): correct path to cross-env binary

* feat(minify-docker): use import.meta.dirname

* chore(deps): remove deprecated @types/imapflow dependency
2025-10-18 01:48:38 +08:00
Tony 857d5989c1 feat(utils/puppeteer): replace puppeteer-extra-plugin-stealth with rebrowser (#19506)
* feat: use rebrowser

* fix: remove rebrowser-puppeteer-core

* fix: chrome not found

* fix: replace remove-infobar with disable-blink-features

remove-infobar was removed since M76 https://github.com/puppeteer/puppeteer/issues/1765

* feat: remove outdated stealth plugin

* fix: remove puppeteer non stealth test
2025-07-01 04:38:05 +08:00
Tony 3227914750 chore: fix puppeteer not found in chromium-downloader stage 2025-06-03 22:47:01 +08:00
Tony 2e54e36028 chore(deps): bump to pnpm v10 2025-06-03 20:50:39 +08:00
Tony c89c875548 chore: fix docker build
fix #18999
2025-05-03 22:29:44 +08:00
Tony dd96d12ebb revert: "chore: minify docker (#18914)" (#18931)
This reverts commit e9013a2313.
2025-04-24 02:18:02 +08:00
Tony e9013a2313 chore: minify docker (#18914)
* chore: minify docker

* chore: bring back minify script
2025-04-23 02:42:25 +08:00
Tony 32699f1cc2 chore: pin to pnpm v9 in chromium-downloader stage
v10 does not run lifecycle scripts by default
2025-02-04 23:59:39 +08:00
Tony 4d4b3ea15f chore: bump pnpm to 9.15.5 2025-02-03 14:02:26 +08:00
Tony 3396568734 chore: bump pnpm to 9.15.5 2025-02-03 13:59:58 +08:00
Tony f163b4e602 build(docker): use corepack before setting registry (#17004) 2024-10-05 05:03:03 +08:00
Nya Candy df5cad0db9 chore: add missing curl to docker image (#16537) 2024-08-26 20:34:32 +08:00
Tony 4e54a006db chore(dockerfile): update key value format
refs: https://docs.docker.com/reference/build-checks/legacy-key-value-format/
2024-08-08 04:46:07 +08:00
Tony 709dc9a6e2 chore: docker bump base image (#15829)
* chore: docker bump base image

* chore: bump pnpm
2024-06-06 15:53:09 +08:00
Tony 9b09c12d9b chore: use pnpm provided by corepack 2024-05-08 00:55:53 +08:00
Henry Wang 2ccd6446af chore: bump pnpm lockfile (#15501)
* chore: bump pnpm lockfile

* chore: update Dockerfile pnpm version

* chore: add packageManager version

* chore: bump CI pnpm version

* Revert "chore: update Dockerfile pnpm version"

This reverts commit 6178d92e39.

* fix: revert Dockerfile auto-format

---------
2024-05-08 00:53:52 +08:00
Rongrong c5c080ba37 build(Dockerfile): set CHROMIUM_EXECUTABLE_PATH to absolute path (#15322)
* build(Dockerfile): set CHROMIUM_EXECUTABLE_PATH to absolute path

Signed-off-by: Rongrong <i@rong.moe>

* ci(test): set CHROMIUM_EXECUTABLE_PATH to absolute path

Signed-off-by: Rongrong <i@rong.moe>

---------

Signed-off-by: Rongrong <i@rong.moe>
2024-04-22 21:15:31 +08:00
Tony 9739188a3c chore: pin pnpm to v8 in docker instead of installing v9 via corepack 2024-04-17 00:18:56 +08:00
DIYgod b774c60858 test: add full routes test (#14934)
* test: add critical routes test

* fix: youtube channels config

* test: add full routes test

* test: output full routes test result

* test: build routes before test

* test: use one reporter

* test: fix cache test errors

* test: fix cache test errors

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* fix: build script

* chore: puppeteerrc rename

* test: route test names

* chore: pass test result to docs
2024-03-24 19:00:03 +08:00
DIYgod 61bd55ac33 chore: fix missing git in docker 2024-03-14 20:52:52 +08:00
DIYgod 26072a79ce chore: remove unused code 2024-03-09 01:41:06 +08:00
DIYgod fe320c1153 feat: lazy load for production 2024-03-09 01:31:42 +08:00
DIYgod 4300d6d1f6 chore: temporarily remove docker minifier 2024-02-26 15:47:18 +08:00
Tony 78d9027c2f chore: bump to node 20 (#13801) 2023-11-15 21:33:21 +08:00
TonyRL c98cbf8ce9 chore: try fix arm64 build 2023-08-14 14:30:28 +00:00
Tony ac90895a9f build: fix vercel build (#13006) 2023-08-12 15:54:49 +08:00
Tony 79eae1eb45 refactor: replace re2 with re2-wasm (#12998)
* refactor: replace re2 with re2-wasm

* refactor: remove migrated routes

* ci: remove foresight

https://github.com/runforesight
Foresight is no longer in service

* fix: add back removed wasm

chore: bump base OS image
2023-08-12 00:34:28 +08:00
TonyRL 9b31d57095 chore: fix install from git with production flag
reference:
https://github.com/typicode/husky/issues/914#issuecomment-1046274220

https://github.com/typicode/husky/issues/920#issuecomment-1202503697
fix: https://github.com/DIYgod/RSSHub/commit/bc162849da19589455f74e6889aaf0a8ee1c9d72#commitcomment-117186018
fix: #12686
2023-06-21 12:17:59 +00:00
Tony 6477e64101 chore: disable husky in CI with a custom script 2023-05-08 14:17:09 +08:00
TonyRL b11eee16c1 chore: disable husky in CI with a custom script 2023-05-08 03:38:14 +00:00
Tony a0ea328013 build: fix pnpm pptr postinstall (#12450)
* chore: fix chrome not found in jest

* chore: explicitly require deps for stealth plugin
2023-05-05 23:58:29 +08:00
Tony 1de1e9ae56 build: use pnpm (#12438)
* build: use pnpm

* fix: use corepack pnpm

* chore: use pnpm in gha

* chore: add setup pnpm

* fix: install command

* fix: pnpm lock file not updated

* chore: pnpm no recursive install

* docs: use pnpm

* fix: ignore yarn lock

* chore: update command for cloud dev env
2023-05-05 20:09:54 +08:00
dependabot[bot] fd05cd7585 chore(deps): bump puppeteer from 19.11.1 to 20.0.0 (#12424)
* chore(deps): bump puppeteer from 19.11.1 to 20.0.0

Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 19.11.1 to 20.0.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.11.1...puppeteer-v20.0.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: use `PUPPETEER_SKIP_DOWNLOAD`

ref: https://github.com/puppeteer/puppeteer/pull/10054

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-04 03:57:04 +08:00
DIYgod 3d6d8eb107 chore: use node 18 2023-03-19 21:49:18 +00:00
Tony 98a03732ca build(docker): put bundled chrome in node_modules (#12075) 2023-03-10 22:56:34 +08:00
dependabot[bot] f095eafce7 chore(deps): bump puppeteer from 18.2.1 to 19.0.0 (#11094)
* chore(deps): bump puppeteer from 18.2.1 to 19.0.0

Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 18.2.1 to 19.0.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v18.2.1...puppeteer-core-v19.0.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build: fix chromium binary location again

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-15 20:13:13 +08:00
Tony 4f4be1fff7 build(docker): fix chromium favour (#11027) 2022-10-08 22:51:41 +08:00
Tony 8486e9dd2c fix(route): zhihu x-zse-96 v3 (#11022)
* fix(route): zhihu x-zse-96 v3

* revert: "chore: fix docker build (#10956)"

This reverts commit 5af05ea618.

* revert: "fix(dockerfile): add missing librsvg2 for arm64/v7 (#11021)"

This reverts commit f340a9072e.

* chore: yarn rebuild

* fix: typo

* refactor: simpler got request

* fix: misc fixes
2022-10-08 03:11:58 +08:00
Felix Hsu f340a9072e fix(dockerfile): add missing librsvg2 for arm64/v7 (#11021) 2022-10-07 10:33:55 +00:00
Tony 5af05ea618 chore: fix docker build (#10956) 2022-09-29 21:13:37 +08:00
Rongrong 17fa8f5f67 perf(Dockerfile): speed up build (#10621)
Signed-off-by: Rongrong <i@rong.moe>

Signed-off-by: Rongrong <i@rong.moe>
2022-08-26 17:42:02 +08:00
DIYgod 8cf4fe41f2 fix: re2 docker build error 2022-06-21 17:19:48 +01:00