Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d88f1a3b8d | |||
| 5ccabec3e4 | |||
| 289be86fc6 | |||
| 79cf9635c6 | |||
| bc5e02249d | |||
| 36de6cf6dd | |||
| 23254afc49 | |||
| 00b8e103c0 | |||
| 7a1b2fc244 | |||
| 61c4fd401f | |||
| 71176c9a12 | |||
| b5cd81d6e7 | |||
| 46aab1d9f4 | |||
| ed1de1a5b1 | |||
| b89627b8ce | |||
| 33c2fd4bcd | |||
| b3e40b3344 | |||
| 9f12b35e6d | |||
| 4fde411be3 |
@@ -19,8 +19,7 @@ from playwright.sync_api import Route, Response, sync_playwright
|
|||||||
from tenacity import Retrying, stop_after_attempt, wait_exponential, RetryError
|
from tenacity import Retrying, stop_after_attempt, wait_exponential, RetryError
|
||||||
|
|
||||||
from kb_workflow.metadata.zhihu_extractor import PlaywrightBrowser
|
from kb_workflow.metadata.zhihu_extractor import PlaywrightBrowser
|
||||||
# NOTE: get_settings is imported lazily in _get_cookie() to avoid circular import
|
from kb_workflow.pipeline.config import get_settings
|
||||||
# Circular: zhihu_crawler -> pipeline.config -> pipeline.platforms -> zhihu_crawler
|
|
||||||
from .models import (
|
from .models import (
|
||||||
AnswerData,
|
AnswerData,
|
||||||
ArticleData,
|
ArticleData,
|
||||||
@@ -130,9 +129,6 @@ class ZhihuCrawler:
|
|||||||
Returns:
|
Returns:
|
||||||
Cookie string from settings
|
Cookie string from settings
|
||||||
"""
|
"""
|
||||||
# Lazy import to avoid circular dependency:
|
|
||||||
# zhihu_crawler -> pipeline.config -> pipeline.platforms -> zhihu_crawler
|
|
||||||
from kb_workflow.pipeline.config import get_settings
|
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
return settings.zhihu_cookie.get_secret_value()
|
return settings.zhihu_cookie.get_secret_value()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user