forked from NanmiCoder/MediaCrawler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f8541a
commit dfb1788
Showing
9 changed files
with
197 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,44 @@ | ||
# Desc: base config | ||
# 基础配置 | ||
PLATFORM = "xhs" | ||
KEYWORDS = "python,golang" | ||
LOGIN_TYPE = "qrcode" # qrcode or phone or cookie | ||
COOKIES = "" # login by cookie, if login_type is cookie, you must set this value | ||
COOKIES = "" | ||
CRAWLER_TYPE = "search" | ||
|
||
# enable ip proxy | ||
# 是否开启 IP 代理 | ||
ENABLE_IP_PROXY = False | ||
|
||
# retry_interval | ||
# 重试时间 | ||
RETRY_INTERVAL = 60 * 30 # 30 minutes | ||
|
||
# playwright headless | ||
HEADLESS = True | ||
|
||
# save login state | ||
# 是否保存登录状态 | ||
SAVE_LOGIN_STATE = True | ||
|
||
# save user data dir | ||
# 用户浏览器缓存的浏览器文件配置 | ||
USER_DATA_DIR = "%s_user_data_dir" # %s will be replaced by platform name | ||
|
||
# crawler max notes count | ||
# 爬取视频/帖子的数量控制 | ||
CRAWLER_MAX_NOTES_COUNT = 20 | ||
|
||
# max concurrency num | ||
# 并发爬虫数量控制 | ||
MAX_CONCURRENCY_NUM = 10 | ||
|
||
|
||
# xhs specified note id list | ||
# 指定小红书需要爬虫的笔记ID列表 | ||
XHS_SPECIFIED_ID_LIST = [ | ||
"6422c2750000000027000d88", | ||
"64ca1b73000000000b028dd2", | ||
"630d5b85000000001203ab41", | ||
# ........................ | ||
] | ||
|
||
|
||
# douyin specified note id list | ||
# 指定抖音需要爬取的ID列表 | ||
DY_SPECIFIED_ID_LIST = [ | ||
"7280854932641664319", | ||
"7202432992642387233" | ||
# ........................ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
query commentListQuery($photoId: String, $pcursor: String) { | ||
visionCommentList(photoId: $photoId, pcursor: $pcursor) { | ||
commentCount | ||
pcursor | ||
rootComments { | ||
commentId | ||
authorId | ||
authorName | ||
content | ||
headurl | ||
timestamp | ||
likedCount | ||
realLikedCount | ||
liked | ||
status | ||
authorLiked | ||
subCommentCount | ||
subCommentsPcursor | ||
subComments { | ||
commentId | ||
authorId | ||
authorName | ||
content | ||
headurl | ||
timestamp | ||
likedCount | ||
realLikedCount | ||
liked | ||
status | ||
authorLiked | ||
replyToUserName | ||
replyTo | ||
__typename | ||
} | ||
__typename | ||
} | ||
__typename | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .douyin import * | ||
from .kuaishou import * | ||
from .xiaohongshu import * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.