{"record":{"id":"084ec9fa46e33c40","repo":"Panniantong/Agent-Reach","slug":"automatic-full-domain-extraction-is-disabled-for","errorCode":null,"errorMessage":"Automatic full-domain extraction is disabled for {spec['name']}.","messagePattern":"Automatic full-domain extraction is disabled for (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent_reach/cookie_extract.py","lineNumber":235,"sourceCode":"\n    The legacy function name is retained for API compatibility, but an\n    all-platform read is intentionally no longer supported.\n\n    Returns:\n        {\"xueqiu\": {\"xq_a_token\": \"xxx\"}}\n    \"\"\"\n    spec = _platform_spec(platform)\n    _require_browser_extractable(spec)\n    browser = browser.lower()\n    if browser not in SUPPORTED_BROWSERS:\n        raise ValueError(\n            f\"Unsupported browser: {scrub_url_credentials(browser)}. \"\n            f\"Supported: {', '.join(SUPPORTED_BROWSERS)}\"\n        )\n    cookie_file = _profile_cookie_file(browser, profile) if profile else None\n    needed_cookies = spec[\"cookies\"]\n    if needed_cookies is None:\n        raise ValueError(\n            f\"Automatic full-domain extraction is disabled for {spec['name']}.\"\n        )\n\n    # Try rookiepy first (Rust-based, more stable), fallback to browser_cookie3\n    use_rookiepy = False\n    if cookie_file is None:\n        try:\n            import rookiepy\n            use_rookiepy = True\n        except ImportError:\n            pass\n    if not use_rookiepy:\n        try:\n            import browser_cookie3\n        except ImportError:\n            profile_hint = (\n                f\" for profile '{scrub_url_credentials(profile)}'\"\n                if profile is not None","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/Panniantong/Agent-Reach/blob/93ae1d18c37b707dec053c7c4f9d91cd8ef8943d/agent_reach/cookie_extract.py#L217-L253","documentation":"Raised by extract_all() in agent_reach/cookie_extract.py when the resolved PlatformSpec has cookies=None, meaning the platform's spec deliberately disables whole-domain cookie harvesting. Only platforms with an explicit cookie-name list can be auto-extracted; for others the extraction backend would have to slurp every cookie, which the project forbids.","triggerScenarios":"A PlatformSpec whose 'cookies' field is None reaching the needed_cookies check — i.e. a platform added to PLATFORM_SPECS without a concrete cookie list (twitter/xhs are additionally blocked earlier by _require_browser_extractable).","commonSituations":"Extending PLATFORM_SPECS with a new platform and forgetting the 'cookies' tuple; custom forks that loosen the Cookie-Editor-only policy but skip defining which cookies matter.","solutions":["Give the platform spec an explicit tuple of required cookie names so only those are read","Use the manual Cookie-Editor export flow instead of automatic extraction for that platform","Prefer bilibili/xueqiu for automatic extraction — their specs define cookie lists"],"exampleFix":"# before (spec definition)\n{'config_key': 'foo', 'name': 'Foo', 'domains': ('foo.com',), 'cookies': None}\n\n# after\n{'config_key': 'foo', 'name': 'Foo', 'domains': ('foo.com',), 'cookies': ('session', 'token')}","handlingStrategy":"validation","validationCode":"spec = _PLATFORM_SPECS_BY_KEY[platform.lower()]\nif spec.get('cookies') is None:\n    raise ValueError(f'{spec[\"name\"]} cannot be auto-extracted; use Cookie-Editor')","typeGuard":"def has_cookie_list(spec) -> bool:\n    return spec.get('cookies') is not None","tryCatchPattern":"try:\n    extract_all(browser=b, platform=p)\nexcept ValueError as e:\n    if 'full-domain extraction is disabled' in str(e):\n        run_cookie_editor_flow(p)\n    else:\n        raise","preventionTips":["When adding a platform spec, always define the 'cookies' tuple","Only bilibili/xueqiu are intended for automatic extraction"],"tags":["cookies","platform-spec","policy"],"backgroundTag":null,"analyzedSha":"93ae1d18c37b707dec053c7c4f9d91cd8ef8943d","analyzedAt":"2026-08-14T22:54:06.735Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}