[PR #1664] [CLOSED] feat: Add cookie support for browser page access #1877

Closed
opened 2026-03-02 11:59:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/1664
Author: @liCells
Created: 6/23/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 9a9c33e feat: Add cookie support for browser page access

📊 Changes

3 files changed (+91 additions, -0 deletions)

View changed files

📝 apps/workers/workers/crawlerWorker.ts (+59 -0)
📝 docs/docs/03-configuration.md (+30 -0)
📝 packages/shared/config.ts (+2 -0)

📄 Description

Cookies are now managed through a JSON file specified by the BROWSER_COOKIE_PATH configuration.

Changes

  • Added type definition for BROWSER_COOKIE_PATH in packages/shared/config.ts.
  • Implemented asynchronous cookie loading in apps/workers/workers/crawlerWorker.ts using fs.promises.readFile to read the JSON file and Playwright's context.addCookies to load cookies.
  • Updated docs/docs/03-configuration.md to include a description of BROWSER_COOKIE_PATH and an example JSON file format.

Misc

For example adding the auth_token for x/twitter gives access to some of the protected tweets.

Of course, it can also be applied to other similar websites.

Source PR


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/1664 **Author:** [@liCells](https://github.com/liCells) **Created:** 6/23/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`9a9c33e`](https://github.com/karakeep-app/karakeep/commit/9a9c33eaded683561881dde891f4f30674e8e914) feat: Add cookie support for browser page access ### 📊 Changes **3 files changed** (+91 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `apps/workers/workers/crawlerWorker.ts` (+59 -0) 📝 `docs/docs/03-configuration.md` (+30 -0) 📝 `packages/shared/config.ts` (+2 -0) </details> ### 📄 Description Cookies are now managed through a JSON file specified by the BROWSER_COOKIE_PATH configuration. ### Changes - Added type definition for BROWSER_COOKIE_PATH in packages/shared/config.ts. - Implemented asynchronous cookie loading in apps/workers/workers/crawlerWorker.ts using fs.promises.readFile to read the JSON file and Playwright's context.addCookies to load cookies. - Updated docs/docs/03-configuration.md to include a description of BROWSER_COOKIE_PATH and an example JSON file format. ### Misc For example adding the auth_token for x/twitter gives access to some of the protected tweets. Of course, it can also be applied to other similar websites. [Source PR](https://github.com/karakeep-app/karakeep/pull/1636) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1877
No description provided.