2023-11-26 13:43:39 +00:00
|
|
|
|
# 基础配置
|
2023-06-27 15:38:30 +00:00
|
|
|
|
PLATFORM = "xhs"
|
2023-08-16 11:49:41 +00:00
|
|
|
|
KEYWORDS = "python,golang"
|
2023-07-30 13:30:26 +00:00
|
|
|
|
LOGIN_TYPE = "qrcode" # qrcode or phone or cookie
|
2023-11-26 13:43:39 +00:00
|
|
|
|
COOKIES = ""
|
2023-11-18 05:38:11 +00:00
|
|
|
|
CRAWLER_TYPE = "search"
|
2023-06-27 15:38:30 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 是否开启 IP 代理
|
2023-12-08 16:06:57 +00:00
|
|
|
|
ENABLE_IP_PROXY = False
|
2023-12-07 16:10:04 +00:00
|
|
|
|
|
|
|
|
|
# 代理IP池数量
|
|
|
|
|
IP_PROXY_POOL_COUNT = 2
|
2023-06-27 15:38:30 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 重试时间
|
2023-06-27 15:38:30 +00:00
|
|
|
|
RETRY_INTERVAL = 60 * 30 # 30 minutes
|
|
|
|
|
|
2023-12-15 16:12:20 +00:00
|
|
|
|
# 无头浏览器的标识,True:开启 False 关闭(会打开一个浏览器)
|
|
|
|
|
HEADLESS = False
|
2023-07-15 09:11:53 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 是否保存登录状态
|
2023-07-24 12:59:43 +00:00
|
|
|
|
SAVE_LOGIN_STATE = True
|
2023-07-15 09:11:53 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 用户浏览器缓存的浏览器文件配置
|
2023-07-15 09:11:53 +00:00
|
|
|
|
USER_DATA_DIR = "%s_user_data_dir" # %s will be replaced by platform name
|
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 爬取视频/帖子的数量控制
|
2023-07-29 07:35:40 +00:00
|
|
|
|
CRAWLER_MAX_NOTES_COUNT = 20
|
2023-07-15 14:25:56 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 并发爬虫数量控制
|
2023-07-15 14:25:56 +00:00
|
|
|
|
MAX_CONCURRENCY_NUM = 10
|
2023-11-18 05:38:11 +00:00
|
|
|
|
|
2023-12-13 15:53:12 +00:00
|
|
|
|
# 每个视频/帖子抓取评论最大条数 (为0则不限制)
|
|
|
|
|
MAX_COMMENTS_PER_POST = 10
|
2023-12-05 03:21:47 +00:00
|
|
|
|
|
2023-12-13 15:53:12 +00:00
|
|
|
|
# 评论关键词筛选(只会留下包含关键词的评论,为空不限制)
|
|
|
|
|
COMMENT_KEYWORDS = [
|
2023-12-05 03:21:47 +00:00
|
|
|
|
"我"
|
|
|
|
|
# ........................
|
|
|
|
|
]
|
2023-11-18 05:38:11 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 指定小红书需要爬虫的笔记ID列表
|
2023-11-18 07:53:10 +00:00
|
|
|
|
XHS_SPECIFIED_ID_LIST = [
|
2023-12-09 13:10:01 +00:00
|
|
|
|
"6422c2750000000027000d88",
|
|
|
|
|
"64ca1b73000000000b028dd2",
|
|
|
|
|
"630d5b85000000001203ab41",
|
|
|
|
|
# ........................
|
2023-11-18 05:38:11 +00:00
|
|
|
|
]
|
2023-11-18 14:07:30 +00:00
|
|
|
|
|
2023-11-26 13:43:39 +00:00
|
|
|
|
# 指定抖音需要爬取的ID列表
|
2023-11-18 14:07:30 +00:00
|
|
|
|
DY_SPECIFIED_ID_LIST = [
|
2023-12-09 13:10:01 +00:00
|
|
|
|
"7280854932641664319",
|
|
|
|
|
"7202432992642387233"
|
|
|
|
|
# ........................
|
2023-12-07 16:10:04 +00:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# 指定快手平台需要爬取的ID列表
|
2023-12-09 13:10:01 +00:00
|
|
|
|
KS_SPECIFIED_ID_LIST = []
|
2023-12-07 16:10:04 +00:00
|
|
|
|
|
2023-12-09 13:10:01 +00:00
|
|
|
|
# 指定B站平台需要爬取的视频ID列表
|
|
|
|
|
BILI_SPECIFIED_ID_LIST = [
|
|
|
|
|
"416252543",
|
|
|
|
|
"976148468"
|
|
|
|
|
# ........................
|
|
|
|
|
]
|