Skip to content

fix(configure): add --platform filter to --from-browser (#446)#474

Open
nankingjing wants to merge 1 commit into
Panniantong:mainfrom
nankingjing:fix/446-from-browser-platform-filter
Open

fix(configure): add --platform filter to --from-browser (#446)#474
nankingjing wants to merge 1 commit into
Panniantong:mainfrom
nankingjing:fix/446-from-browser-platform-filter

Conversation

@nankingjing

Copy link
Copy Markdown

Closes #446

Summary

agent-reach configure --from-browser chrome previously extracted cookies for ALL supported platforms, over-collecting and persisting full-domain cookie strings. Add --platform flag to limit extraction.

agent-reach configure --from-browser chrome --platform twitter

Changes

  • agent_reach/cli.py — add --platform argument
  • agent_reach/cookie_extract.py — filter PLATFORM_SPECS by platform
  • tests/test_cookie_extract_perms.py — 3 new tests

Verification

pytest tests/test_cookie_extract_perms.py -v -q
3 passed, 6 skipped in 0.05s

)

agent-reach configure --from-browser chrome previously
extracted cookies for ALL supported platforms in one pass,
over-collecting and persisting full-domain cookie strings
for platforms whose spec uses cookies: None (XHS/Xueqiu).

Add --platform flag so users can limit extraction to a
single platform:

    agent-reach configure --from-browser chrome --platform twitter

The install path is unchanged (extracts all platforms).

Includes tests for platform filter logic and unknown-platform
error.

Fixes Panniantong#446

Co-Authored-By: Claude <noreply@anthropic.com>

@moxxxskaifa moxxxskaifa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决 #446(--from-browser 过量采集 cookie):

  • extract_all() 增加 platform 参数 ✅
  • 筛选只在 python 层面做,不影响底层的 rookiepy/cookie3 ✅

63 行安全的新功能。 LGTM!

@nankingjing

Copy link
Copy Markdown
Author

您好 @moxxxskaifa,这个 PR 已经 approved,是否可以合并了?谢谢!

@nankingjing

Copy link
Copy Markdown
Author

Hi @moxxxskaifa, this PR has been approved — could you merge it when you have a moment? Thanks!

@nankingjing

Copy link
Copy Markdown
Author

您好 @Panniantong

打扰一下。目前有 5 个已通过 @moxxxskaifa 审查并批准的 PR 等待合并,均已 approved 于 7 月 5 日:

这五个 PR 都是 bug 修复 / 兼容性改进,代码量不大,且均已通过 review。如果没有什么问题的话,能否麻烦您合并一下?或者是否还需要我们补充什么?

非常感谢您维护这个项目,辛苦了!

CC @moxxxskaifa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configure --from-browser over-collects and persists full browser cookie sets

2 participants