Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Doiiars
2026-03-07 10:25:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
647cc54636f6e33089f317152c7169fa10adcac7
647cc546
1 parent
6c5a9923
PlatformCrawler: 初始化时提前检测MediaCrawler子模块是否完整
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
MindSpider/DeepSentimentCrawling/platform_crawler.py
MindSpider/DeepSentimentCrawling/platform_crawler.py
View file @
647cc54
...
...
@@ -33,9 +33,13 @@ class PlatformCrawler:
self
.
supported_platforms
=
[
'xhs'
,
'dy'
,
'ks'
,
'bili'
,
'wb'
,
'tieba'
,
'zhihu'
]
self
.
crawl_stats
=
{}
# 确保MediaCrawler目录存在
if
not
self
.
mediacrawler_path
.
exists
():
raise
FileNotFoundError
(
f
"MediaCrawler目录不存在: {self.mediacrawler_path}"
)
# 确保MediaCrawler子模块已初始化
db_config_path
=
self
.
mediacrawler_path
/
"config"
/
"db_config.py"
if
not
self
.
mediacrawler_path
.
exists
()
or
not
db_config_path
.
exists
():
logger
.
error
(
"MediaCrawler子模块未初始化或不完整"
)
logger
.
error
(
"请在项目根目录运行以下命令初始化子模块:"
)
logger
.
error
(
" git submodule update --init --recursive"
)
raise
FileNotFoundError
(
"MediaCrawler子模块未初始化,请先运行: git submodule update --init --recursive"
)
logger
.
info
(
f
"初始化平台爬虫管理器,MediaCrawler路径: {self.mediacrawler_path}"
)
...
...
Please
register
or
login
to post a comment