Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NanmiCoder/MediaCrawler
/ functions
Functions
1,133 in github.com/NanmiCoder/MediaCrawler
⨍
Functions
1,133
◇
Types & classes
236
↳
Endpoints
25
↓ 421 callers
Method
get
Get the value of a key from the cache and deserialize it :param key: :return:
cache/redis_cache.py:56
↓ 154 callers
Method
get
GET request with header signing Args: uri: Request route params: Request parameters return_ori_co
media_platform/tieba/client.py:278
↓ 132 callers
Method
get
GET request with header signing Args: uri: Request URI params: Request parameters Returns:
media_platform/zhihu/client.py:127
↓ 90 callers
Function
Field
({ label, hint, children }: FieldProps)
webui/src/components/config/CrawlerConfigPanel.tsx:51
↓ 60 callers
Method
get
GET request, signs request headers Args: uri: Request route params: Request parameters Returns:
media_platform/xhs/client.py:165
↓ 45 callers
Method
get
(self, uri: str, params=None, enable_params_sign: bool = True)
media_platform/bilibili/client.py:120
↓ 45 callers
Method
get
(self, uri: str, params=None, headers=None, **kwargs)
media_platform/weibo/client.py:104
↓ 45 callers
Method
get
GET请求
media_platform/douyin/client.py:137
↓ 39 callers
Method
_class_contains
(class_name: str)
media_platform/tieba/help.py:44
↓ 38 callers
Function
mask_nickname
昵称中间脱敏:首尾各保留 1 字,中间替换为星号。 - 长度 <= 1:返回 "*" - 长度 == 2:首字 + "*" - 长度 >= 3:首字 + "***" + 尾字 这样既保留教学分析所需的内容归属语义,又无法据昵称定位到真人。
tools/user_hash.py:22
↓ 36 callers
Function
anonymize_user_id
把原始用户 ID 转成匿名哈希,用于内容/评论记录的创作者分组, 不暴露真实身份。返回 sha256 截断 16 位的十六进制串。
tools/user_hash.py:11
↓ 36 callers
Function
cn
(...inputs: ClassValue[])
webui/src/lib/utils.ts:4
↓ 34 callers
Method
get
(self, uri: str, params=None)
media_platform/kuaishou/client.py:78
↓ 33 callers
Method
keys
Get all keys matching the pattern First try KEYS command, if not supported fallback to SCAN
cache/redis_cache.py:77
↓ 27 callers
Method
set
Set the value of a key in the cache and serialize it :param key: :param value: :param expire_time: :return:
cache/redis_cache.py:67
↓ 19 callers
Method
_selector_text
(cls, selector: Selector, xpath: str)
media_platform/tieba/help.py:52
↓ 19 callers
Function
make_async_client
创建统一配置的 httpx.AsyncClient。 从配置文件读取 DISABLE_SSL_VERIFY(默认 False,即开启 SSL 验证)。 仅在使用企业代理、Burp、mitmproxy 等中间人代理时才需将其设为 True。
tools/httpx_util.py:6
↓ 19 callers
Method
save_or_update
Save or update data (upsert)
database/mongodb_store_base.py:105
↓ 19 callers
Method
write_single_item_to_json
(self, item: Dict, item_type: str)
tools/async_file_writer.py:62
↓ 19 callers
Method
write_to_csv
(self, item: Dict, item_type: str)
tools/async_file_writer.py:46
↓ 19 callers
Method
write_to_jsonl
(self, item: Dict, item_type: str)
tools/async_file_writer.py:56
↓ 17 callers
Method
get_instance
Get or create a singleton instance for the given platform and crawler type Args: platform: Platform name (xhs, dy, ks, e
store/excel_store_base.py:64
↓ 17 callers
Function
get_session
()
database/db_session.py:88
↓ 13 callers
Method
get_proxy
Abstract method to get IP, different HTTP proxy providers need to implement this method :param num: Number of IPs to extract
proxy/base_proxy.py:44
↓ 12 callers
Method
_create_log_entry
Create log entry
api/services/crawler_manager.py:57
↓ 12 callers
Method
cleanup
Cleanup resources Args: force: Whether to force cleanup browser process (ignoring AUTO_CLOSE_BROWSER config)
tools/cdp_browser.py:437
↓ 12 callers
Function
create_ip_pool
Create IP proxy pool :param ip_pool_count: Number of IPs in the pool :param enable_validate_ip: Whether to enable IP proxy validation
proxy/proxy_ip_pool.py:198
↓ 12 callers
Function
le
(e, r)
libs/douyin.js:31
↓ 11 callers
Method
_push_log
Push log to queue
api/services/crawler_manager.py:72
↓ 10 callers
Method
_absolute_url
(url: str)
media_platform/tieba/help.py:59
↓ 10 callers
Method
close
Close browser context
media_platform/zhihu/core.py:491
↓ 10 callers
Method
create_store
()
store/xhs/__init__.py:47
↓ 10 callers
Method
is_expired
Check if proxy IP has expired Args: buffer_seconds: Buffer time (seconds), how many seconds ahead to consider expired to
proxy/types.py:48
↓ 10 callers
Method
search
Search for notes and retrieve their comment information. Returns:
media_platform/tieba/core.py:148
↓ 9 callers
Method
_normalize_text
(text: str)
media_platform/tieba/help.py:48
↓ 9 callers
Method
_refresh_proxy_if_expired
Check if proxy is expired and automatically refresh if necessary
media_platform/tieba/client.py:218
↓ 9 callers
Function
extract_text_from_html
Extract text from HTML, removing all tags.
tools/crawler_util.py:215
↓ 9 callers
Method
find_one
Query a single record
database/mongodb_store_base.py:115
↓ 9 callers
Method
is_current_proxy_expired
Check if current proxy has expired Args: buffer_seconds: Buffer time (seconds), how many seconds ahead to consider expire
proxy/proxy_ip_pool.py:118
↓ 9 callers
Method
store_content
(self, content_item)
tests/test_no_user_info.py:118
↓ 8 callers
Method
get_browser_info
Get browser info
tools/cdp_browser.py:516
↓ 7 callers
Method
add_cookies
Add cookies
tools/cdp_browser.py:413
↓ 7 callers
Method
launch_and_connect
Launch browser and connect via CDP
tools/cdp_browser.py:97
↓ 6 callers
Method
_fetch_json_by_browser
Fetch current Tieba PC JSON APIs from the browser context. These APIs rely on logged-in browser cookies and Baidu's PC signing
media_platform/tieba/client.py:82
↓ 6 callers
Function
get_current_timestamp
Get current timestamp (13 digits): 1701493264496 :return:
tools/time_util.py:30
↓ 6 callers
Method
init_proxy_pool
Initialize proxy pool reference Args: proxy_ip_pool: Proxy IP pool instance
proxy/proxy_mixin.py:49
↓ 5 callers
Function
B
(e, t)
libs/zhihu.js:26
↓ 5 callers
Method
__init__
(self, **kwargs)
store/xhs/_store_impl.py:123
↓ 5 callers
Method
_auto_adjust_column_width
Auto-adjust column widths based on content Args: sheet: Worksheet object
store/excel_store_base.py:171
↓ 5 callers
Function
_check_nickname_masked
(d: dict, raw: str, label: str)
tests/test_no_user_info.py:76
↓ 5 callers
Function
_check_no_forbidden_keys
(d: dict, label: str)
tests/test_no_user_info.py:70
↓ 5 callers
Method
_connect_via_cdp
Connect to browser via CDP
tools/cdp_browser.py:313
↓ 5 callers
Method
_get_file_path
(self, file_type: str, item_type: str)
tools/async_file_writer.py:37
↓ 5 callers
Method
_write_headers
Write headers to sheet Args: sheet: Worksheet object headers: List of header names
store/excel_store_base.py:193
↓ 5 callers
Method
_write_row
Write data row to sheet Args: sheet: Worksheet object data: Data dictionary headers: List of hea
store/excel_store_base.py:206
↓ 5 callers
Method
get_aweme_media
获取抖音媒体,自动判断媒体类型是短视频还是帖子图片并下载 Args: aweme_item (Dict): 抖音作品详情
media_platform/douyin/core.py:402
↓ 5 callers
Method
get_collection
Get collection: {prefix}_{suffix}
database/mongodb_store_base.py:99
↓ 5 callers
Function
i
(e, t, n)
libs/zhihu.js:15
↓ 5 callers
Method
post
(self, uri: str, data: dict)
media_platform/weibo/client.py:114
↓ 5 callers
Method
post
(self, uri: str, data: dict)
media_platform/kuaishou/client.py:86
↓ 5 callers
Function
read_fixture
(name: str)
tests/test_tieba_extractor.py:12
↓ 5 callers
Method
request
(self, method, url, **kwargs)
media_platform/weibo/client.py:73
↓ 5 callers
Method
request
Wrapper for httpx common request method, processes request response Args: method: Request method url: Request
media_platform/xhs/client.py:116
↓ 4 callers
Function
Q
(e, t)
libs/zhihu.js:22
↓ 4 callers
Function
_assert_no_forbidden
(captured: dict, label: str)
tests/test_douyin_no_user_info.py:147
↓ 4 callers
Function
_coerce_enum
Safely convert a raw config value to an enum member.
cmd_arg/arg.py:95
↓ 4 callers
Method
_ensure_tieba_suffix
(tieba_name: str)
media_platform/tieba/help.py:73
↓ 4 callers
Method
_extract_content_or_comment_author
extract zhihu author Args: author: Returns:
media_platform/zhihu/help.py:187
↓ 4 callers
Function
_patch_create_store
把 KuaishouStoreFactory.create_store 替换为返回捕获用 FakeStore 的 staticmethod。 FakeStore 把 store_content/store_comment 收到的 dict 原样写入 holder.content / hold
tests/test_kuaishou_no_user_info.py:95
↓ 4 callers
Function
_patch_factory
把 DouyinStoreFactory.create_store 替换为返回 fake,返回原方法用于还原。
tests/test_douyin_no_user_info.py:140
↓ 4 callers
Method
_tieba_link_from_name
(cls, tieba_name: str)
media_platform/tieba/help.py:78
↓ 4 callers
Function
_to_bool
(value: bool | str)
cmd_arg/arg.py:89
↓ 4 callers
Method
connect
(self, websocket: WebSocket)
api/routers/websocket.py:35
↓ 4 callers
Method
create_cache
Create cache object :param cache_type: Cache type :param args: Arguments :param kwargs: Keyword arguments :re
cache/cache_factory.py:34
↓ 4 callers
Method
extract_data_field_value
Extract data-field value from selector Args: selector: Selector object Returns: Dictionary containin
media_platform/tieba/help.py:793
↓ 4 callers
Method
get_note_by_id
Get post details by post ID (uses Playwright to access page, avoiding API detection) Args: note_id: Post ID Retu
media_platform/tieba/client.py:428
↓ 4 callers
Method
get_specified_notes
Get the information and comments of the specified post Args: note_id_list: Returns:
media_platform/tieba/core.py:247
↓ 4 callers
Function
parse_creator_info_from_url
Parse creator ID from Bilibili creator space URL Args: url: Bilibili creator space link - https://space.bilibili.com/4343
media_platform/bilibili/help.py:107
↓ 4 callers
Method
request
(self, method, url, **kwargs)
media_platform/bilibili/client.py:69
↓ 4 callers
Method
request
Common request method wrapper for requests, handles request responses Args: method: Request method url: Reque
media_platform/tieba/client.py:237
↓ 4 callers
Function
saveClearedLogIdToStorage
(id: number | null)
webui/src/store/crawlerStore.ts:41
↓ 3 callers
Function
_assert_no_forbidden_keys
(d: dict, label: str)
tests/test_kuaishou_no_user_info.py:123
↓ 3 callers
Method
_build_command
Build main.py command line arguments
api/services/crawler_manager.py:205
↓ 3 callers
Method
_connect
Establish connection
database/mongodb_store_base.py:55
↓ 3 callers
Method
_extract_forum_info
(cls, selector: Selector, page_content: str)
media_platform/tieba/help.py:290
↓ 3 callers
Function
_patch_factory
把 store.weibo.WeibostoreFactory.create_store 替换为返回 fake 的静态方法, 返回 (module, orig) 便于 finally 还原。
tests/test_weibo_no_user_info.py:109
↓ 3 callers
Method
_pre_headers
请求头参数签名 (使用 xhshow 纯算法) Args: url: 请求 URI path params: GET 请求参数 payload: POST 请求参数 Returns:
media_platform/xhs/client.py:78
↓ 3 callers
Function
_restore
(wb, orig)
tests/test_weibo_no_user_info.py:118
↓ 3 callers
Function
applyTheme
(resolved: 'light' | 'dark')
webui/src/store/themeStore.ts:27
↓ 3 callers
Method
batch_get_content_comments
Batch get content comments Args: content_list: Returns:
media_platform/zhihu/core.py:201
↓ 3 callers
Method
batch_get_note_comments
Batch get note comments
media_platform/xhs/core.py:326
↓ 3 callers
Method
batch_get_note_comments
Batch get note comments
media_platform/douyin/core.py:234
↓ 3 callers
Method
batch_get_notes_comments
batch get notes comments :param note_id_list: :return:
media_platform/weibo/core.py:228
↓ 3 callers
Method
batch_get_video_comments
batch get video comments :param video_id_list: :return:
media_platform/bilibili/core.py:325
↓ 3 callers
Method
batch_get_video_comments
batch get video comments :param video_id_list: :return:
media_platform/kuaishou/core.py:236
↓ 3 callers
Method
begin
(self)
base/base_crawler.py:70
↓ 3 callers
Method
close
Close connection
database/mongodb_store_base.py:79
↓ 3 callers
Method
create_store
()
store/zhihu/__init__.py:51
↓ 3 callers
Method
create_store
()
store/bilibili/__init__.py:48
↓ 3 callers
Method
extract_comments
extract zhihu comments Args: page_content: zhihu content object comments: zhihu comments Returns:
media_platform/zhihu/help.py:211
next →
1–100 of 1,133, ranked by callers