Usagi-org/ai-goofish-monitor
基于 Playwright 和AI实现的闲鱼多任务实时/定时监控与智能分析系统,配备了功能完善的后台管理UI。帮助用户从闲鱼海量商品中,找到心仪产品。
Python★ 16,699+228 that day#6 on trending
B78.8/100
Duplication86
1.7% in python, vue, typescript, bash, javascript, docker, nginxDead code82
2.1%Complexity70
26.6% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1%duplicated code · 236 of 23,602 lines
20clones in code
228code files of 317 scanned
1.54%duplicated over all files · 40 clones
Most complex files
- src/scraper.py220 cx
- src/services/price_history_service.py105 cx
- src/ai_handler.py97 cx
- src/services/notification_config_service.py84 cx
- src/failure_guard.py83 cx
- web-ui/src/composables/useResults.ts78 cx
- src/domain/models/task.py77 cx
- src/services/result_storage_service.py77 cx
- src/services/dashboard_payloads.py65 cx
- spider_v2.py63 cx
Dead code 2.1% unused · 18 findings
- chrome-extension/background.jsunused-file
- src/infrastructure/persistence/json_task_repository.pyunused-file
- chrome-extension/popup.jsunused-file
- src/services/dashboard_payloads.py:_collect_record_metricsunused-symbol
- web-ui/src/components/HelloWorld.vueunused-file
- src/services/price_history_service.py:build_price_history_pathunused-export
- src/api/routes/settings.py:is_responses_api_unsupported_errorunused-import
- src/ai_handler.py:parse_qslunused-import
- src/ai_handler.py:urlencodeunused-import
- src/ai_handler.py:urlparseunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 32 lines in 2 placespython148 tokens
183@model_validator(mode="before") 184@classmethod 185def normalize_legacy_keyword_payload(cls, values): 186 return _normalize_payload_keywords(values) 187 188@field_validator("min_price", "max_price", mode="before") 189@classmethod 190def convert_price_to_str(cls, value): 191 return _normalize_price_value(value) 192First 10 of 32 lines.
- 7 lines in 3 placespython64 tokens
125account_state_file: Optional[str] = None 126account_strategy: Literal["auto", "fixed", "rotate"] = "auto" 127free_shipping: bool = True 128new_publish_option: Optional[str] = None 129region: Optional[str] = None 130decision_mode: Literal["ai", "keyword"] = "ai" 131keyword_rules: List[str] = Field(default_factory=list) - 13 lines in 2 placesbash119 tokens
136Linux (Debian/Ubuntu) 解决办法: 1371) 安装 Python 与 pip: 138 sudo apt-get update 139 sudo apt-get install -y python3 python3-pip python3-venv 1402) 安装 Node.js 与 npm (LTS): 141 curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - 142 sudo apt-get install -y nodejs 1433) 安装 Playwright: 144 python3 -m pip install playwright 145 python3 -m playwright install chromiumFirst 10 of 13 lines.
7 more
- 18 lines in 2 placespython118 tokens
- 17 lines in 2 placespython111 tokens
- 20 lines in 2 placespython109 tokens
- 19 lines in 2 placestypescript95 tokens
- 9 lines in 2 placespython81 tokens
- 9 lines in 2 placespython77 tokens
- 14 lines in 2 placespython71 tokens
Largest clones over all files, tests and data included
- 32 lines in 2 placespython148 tokens
183@model_validator(mode="before") 184@classmethod 185def normalize_legacy_keyword_payload(cls, values): 186 return _normalize_payload_keywords(values) 187 188@field_validator("min_price", "max_price", mode="before") 189@classmethod 190def convert_price_to_str(cls, value): 191 return _normalize_price_value(value) 192First 10 of 32 lines.
- 7 lines in 3 placespython64 tokens
125account_state_file: Optional[str] = None 126account_strategy: Literal["auto", "fixed", "rotate"] = "auto" 127free_shipping: bool = True 128new_publish_option: Optional[str] = None 129region: Optional[str] = None 130decision_mode: Literal["ai", "keyword"] = "ai" 131keyword_rules: List[str] = Field(default_factory=list) - 10 lines in 3 placespythontests60 tokenstests/unit/test_ai_handler_analysis.py:56–65tests/unit/test_ai_handler_analysis.py:101–110tests/unit/test_ai_handler_analysis.py:227–236
56 ) 57 58monkeypatch.setattr(ai_handler, "client", _build_fake_client(fake_create)) 59monkeypatch.setattr(ai_handler, "MODEL_NAME", "fake-model") 60monkeypatch.setattr(ai_handler, "ENABLE_RESPONSE_FORMAT", True) 61monkeypatch.setattr(app_config, "ENABLE_RESPONSE_FORMAT", True) 62 63result = asyncio.run( 64 ai_handler.get_ai_analysis( 65 {"商品信息": {"商品ID": "2", "商品标题": "测试商品2"}},101 ) 102 103monkeypatch.setattr(ai_handler, "client", _build_fake_client(fake_create)) 104monkeypatch.setattr(ai_handler, "MODEL_NAME", "fake-model") 105monkeypatch.setattr(ai_handler, "ENABLE_RESPONSE_FORMAT", True) 106monkeypatch.setattr(app_config, "ENABLE_RESPONSE_FORMAT", True) 107 108result = asyncio.run( 109 ai_handler.get_ai_analysis( 110 {"商品信息": {"商品ID": "3", "商品标题": "测试商品3"}}, - 13 lines in 2 placesbash119 tokens
- 18 lines in 2 placespython118 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 57 | 9,919 | 11 | 146 | 1.47% |
| typescript | 79 | 4,556 | 5 | 53 | 1.16% |
| html | 31 | 2,408 | 3 | 24 | 1% |
| bash | 2 | 570 | 1 | 13 | 2.28% |
| vue | 54 | 5,645 | 0 | 0 | 0% |
| javascript | 3 | 459 | 0 | 0 | 0% |
| css | 2 | 45 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 103 | 15,171 | 28 | 377 | 2.49% |
| typescript | 87 | 6,020 | 5 | 53 | 0.88% |
| html | 31 | 2,408 | 3 | 24 | 1% |
| yaml | 3 | 222 | 2 | 24 | 10.81% |
| markdown | 8 | 949 | 1 | 7 | 0.74% |
| bash | 6 | 648 | 1 | 13 | 2.01% |
| vue | 54 | 5,645 | 0 | 0 | 0% |
| javascript | 3 | 459 | 0 | 0 | 0% |
| json | 9 | 253 | 0 | 0 | 0% |
| css | 3 | 175 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 4, 2026 | #6 | 16,699 (+228) | 317 | 32,284 | 40 | 1.54% | 1% | B 78.8 | 77f8d75 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.