MCPcopy Create free account

hub / github.com/NanmiCoder/MediaCrawler / functions

Functions1,133 in github.com/NanmiCoder/MediaCrawler

↓ 421 callersMethodget
Get the value of a key from the cache and deserialize it :param key: :return:
cache/redis_cache.py:56
↓ 154 callersMethodget
GET request with header signing Args: uri: Request route params: Request parameters return_ori_co
media_platform/tieba/client.py:278
↓ 132 callersMethodget
GET request with header signing Args: uri: Request URI params: Request parameters Returns:
media_platform/zhihu/client.py:127
↓ 90 callersFunctionField
({ label, hint, children }: FieldProps)
webui/src/components/config/CrawlerConfigPanel.tsx:51
↓ 60 callersMethodget
GET request, signs request headers Args: uri: Request route params: Request parameters Returns:
media_platform/xhs/client.py:165
↓ 45 callersMethodget
(self, uri: str, params=None, enable_params_sign: bool = True)
media_platform/bilibili/client.py:120
↓ 45 callersMethodget
(self, uri: str, params=None, headers=None, **kwargs)
media_platform/weibo/client.py:104
↓ 45 callersMethodget
GET请求
media_platform/douyin/client.py:137
↓ 39 callersMethod_class_contains
(class_name: str)
media_platform/tieba/help.py:44
↓ 38 callersFunctionmask_nickname
昵称中间脱敏:首尾各保留 1 字,中间替换为星号。 - 长度 <= 1:返回 "*" - 长度 == 2:首字 + "*" - 长度 >= 3:首字 + "***" + 尾字 这样既保留教学分析所需的内容归属语义,又无法据昵称定位到真人。
tools/user_hash.py:22
↓ 36 callersFunctionanonymize_user_id
把原始用户 ID 转成匿名哈希,用于内容/评论记录的创作者分组, 不暴露真实身份。返回 sha256 截断 16 位的十六进制串。
tools/user_hash.py:11
↓ 36 callersFunctioncn
(...inputs: ClassValue[])
webui/src/lib/utils.ts:4
↓ 34 callersMethodget
(self, uri: str, params=None)
media_platform/kuaishou/client.py:78
↓ 33 callersMethodkeys
Get all keys matching the pattern First try KEYS command, if not supported fallback to SCAN
cache/redis_cache.py:77
↓ 27 callersMethodset
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 callersMethod_selector_text
(cls, selector: Selector, xpath: str)
media_platform/tieba/help.py:52
↓ 19 callersFunctionmake_async_client
创建统一配置的 httpx.AsyncClient。 从配置文件读取 DISABLE_SSL_VERIFY(默认 False,即开启 SSL 验证)。 仅在使用企业代理、Burp、mitmproxy 等中间人代理时才需将其设为 True。
tools/httpx_util.py:6
↓ 19 callersMethodsave_or_update
Save or update data (upsert)
database/mongodb_store_base.py:105
↓ 19 callersMethodwrite_single_item_to_json
(self, item: Dict, item_type: str)
tools/async_file_writer.py:62
↓ 19 callersMethodwrite_to_csv
(self, item: Dict, item_type: str)
tools/async_file_writer.py:46
↓ 19 callersMethodwrite_to_jsonl
(self, item: Dict, item_type: str)
tools/async_file_writer.py:56
↓ 17 callersMethodget_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 callersFunctionget_session
()
database/db_session.py:88
↓ 13 callersMethodget_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 callersMethod_create_log_entry
Create log entry
api/services/crawler_manager.py:57
↓ 12 callersMethodcleanup
Cleanup resources Args: force: Whether to force cleanup browser process (ignoring AUTO_CLOSE_BROWSER config)
tools/cdp_browser.py:437
↓ 12 callersFunctioncreate_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 callersFunctionle
(e, r)
libs/douyin.js:31
↓ 11 callersMethod_push_log
Push log to queue
api/services/crawler_manager.py:72
↓ 10 callersMethod_absolute_url
(url: str)
media_platform/tieba/help.py:59
↓ 10 callersMethodclose
Close browser context
media_platform/zhihu/core.py:491
↓ 10 callersMethodcreate_store
()
store/xhs/__init__.py:47
↓ 10 callersMethodis_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 callersMethodsearch
Search for notes and retrieve their comment information. Returns:
media_platform/tieba/core.py:148
↓ 9 callersMethod_normalize_text
(text: str)
media_platform/tieba/help.py:48
↓ 9 callersMethod_refresh_proxy_if_expired
Check if proxy is expired and automatically refresh if necessary
media_platform/tieba/client.py:218
↓ 9 callersFunctionextract_text_from_html
Extract text from HTML, removing all tags.
tools/crawler_util.py:215
↓ 9 callersMethodfind_one
Query a single record
database/mongodb_store_base.py:115
↓ 9 callersMethodis_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 callersMethodstore_content
(self, content_item)
tests/test_no_user_info.py:118
↓ 8 callersMethodget_browser_info
Get browser info
tools/cdp_browser.py:516
↓ 7 callersMethodadd_cookies
Add cookies
tools/cdp_browser.py:413
↓ 7 callersMethodlaunch_and_connect
Launch browser and connect via CDP
tools/cdp_browser.py:97
↓ 6 callersMethod_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 callersFunctionget_current_timestamp
Get current timestamp (13 digits): 1701493264496 :return:
tools/time_util.py:30
↓ 6 callersMethodinit_proxy_pool
Initialize proxy pool reference Args: proxy_ip_pool: Proxy IP pool instance
proxy/proxy_mixin.py:49
↓ 5 callersFunctionB
(e, t)
libs/zhihu.js:26
↓ 5 callersMethod__init__
(self, **kwargs)
store/xhs/_store_impl.py:123
↓ 5 callersMethod_auto_adjust_column_width
Auto-adjust column widths based on content Args: sheet: Worksheet object
store/excel_store_base.py:171
↓ 5 callersFunction_check_nickname_masked
(d: dict, raw: str, label: str)
tests/test_no_user_info.py:76
↓ 5 callersFunction_check_no_forbidden_keys
(d: dict, label: str)
tests/test_no_user_info.py:70
↓ 5 callersMethod_connect_via_cdp
Connect to browser via CDP
tools/cdp_browser.py:313
↓ 5 callersMethod_get_file_path
(self, file_type: str, item_type: str)
tools/async_file_writer.py:37
↓ 5 callersMethod_write_headers
Write headers to sheet Args: sheet: Worksheet object headers: List of header names
store/excel_store_base.py:193
↓ 5 callersMethod_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 callersMethodget_aweme_media
获取抖音媒体,自动判断媒体类型是短视频还是帖子图片并下载 Args: aweme_item (Dict): 抖音作品详情
media_platform/douyin/core.py:402
↓ 5 callersMethodget_collection
Get collection: {prefix}_{suffix}
database/mongodb_store_base.py:99
↓ 5 callersFunctioni
(e, t, n)
libs/zhihu.js:15
↓ 5 callersMethodpost
(self, uri: str, data: dict)
media_platform/weibo/client.py:114
↓ 5 callersMethodpost
(self, uri: str, data: dict)
media_platform/kuaishou/client.py:86
↓ 5 callersFunctionread_fixture
(name: str)
tests/test_tieba_extractor.py:12
↓ 5 callersMethodrequest
(self, method, url, **kwargs)
media_platform/weibo/client.py:73
↓ 5 callersMethodrequest
Wrapper for httpx common request method, processes request response Args: method: Request method url: Request
media_platform/xhs/client.py:116
↓ 4 callersFunctionQ
(e, t)
libs/zhihu.js:22
↓ 4 callersFunction_assert_no_forbidden
(captured: dict, label: str)
tests/test_douyin_no_user_info.py:147
↓ 4 callersFunction_coerce_enum
Safely convert a raw config value to an enum member.
cmd_arg/arg.py:95
↓ 4 callersMethod_ensure_tieba_suffix
(tieba_name: str)
media_platform/tieba/help.py:73
↓ 4 callersMethod_extract_content_or_comment_author
extract zhihu author Args: author: Returns:
media_platform/zhihu/help.py:187
↓ 4 callersFunction_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 callersFunction_patch_factory
把 DouyinStoreFactory.create_store 替换为返回 fake,返回原方法用于还原。
tests/test_douyin_no_user_info.py:140
↓ 4 callersMethod_tieba_link_from_name
(cls, tieba_name: str)
media_platform/tieba/help.py:78
↓ 4 callersFunction_to_bool
(value: bool | str)
cmd_arg/arg.py:89
↓ 4 callersMethodconnect
(self, websocket: WebSocket)
api/routers/websocket.py:35
↓ 4 callersMethodcreate_cache
Create cache object :param cache_type: Cache type :param args: Arguments :param kwargs: Keyword arguments :re
cache/cache_factory.py:34
↓ 4 callersMethodextract_data_field_value
Extract data-field value from selector Args: selector: Selector object Returns: Dictionary containin
media_platform/tieba/help.py:793
↓ 4 callersMethodget_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 callersMethodget_specified_notes
Get the information and comments of the specified post Args: note_id_list: Returns:
media_platform/tieba/core.py:247
↓ 4 callersFunctionparse_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 callersMethodrequest
(self, method, url, **kwargs)
media_platform/bilibili/client.py:69
↓ 4 callersMethodrequest
Common request method wrapper for requests, handles request responses Args: method: Request method url: Reque
media_platform/tieba/client.py:237
↓ 4 callersFunctionsaveClearedLogIdToStorage
(id: number | null)
webui/src/store/crawlerStore.ts:41
↓ 3 callersFunction_assert_no_forbidden_keys
(d: dict, label: str)
tests/test_kuaishou_no_user_info.py:123
↓ 3 callersMethod_build_command
Build main.py command line arguments
api/services/crawler_manager.py:205
↓ 3 callersMethod_connect
Establish connection
database/mongodb_store_base.py:55
↓ 3 callersMethod_extract_forum_info
(cls, selector: Selector, page_content: str)
media_platform/tieba/help.py:290
↓ 3 callersFunction_patch_factory
把 store.weibo.WeibostoreFactory.create_store 替换为返回 fake 的静态方法, 返回 (module, orig) 便于 finally 还原。
tests/test_weibo_no_user_info.py:109
↓ 3 callersMethod_pre_headers
请求头参数签名 (使用 xhshow 纯算法) Args: url: 请求 URI path params: GET 请求参数 payload: POST 请求参数 Returns:
media_platform/xhs/client.py:78
↓ 3 callersFunction_restore
(wb, orig)
tests/test_weibo_no_user_info.py:118
↓ 3 callersFunctionapplyTheme
(resolved: 'light' | 'dark')
webui/src/store/themeStore.ts:27
↓ 3 callersMethodbatch_get_content_comments
Batch get content comments Args: content_list: Returns:
media_platform/zhihu/core.py:201
↓ 3 callersMethodbatch_get_note_comments
Batch get note comments
media_platform/xhs/core.py:326
↓ 3 callersMethodbatch_get_note_comments
Batch get note comments
media_platform/douyin/core.py:234
↓ 3 callersMethodbatch_get_notes_comments
batch get notes comments :param note_id_list: :return:
media_platform/weibo/core.py:228
↓ 3 callersMethodbatch_get_video_comments
batch get video comments :param video_id_list: :return:
media_platform/bilibili/core.py:325
↓ 3 callersMethodbatch_get_video_comments
batch get video comments :param video_id_list: :return:
media_platform/kuaishou/core.py:236
↓ 3 callersMethodbegin
(self)
base/base_crawler.py:70
↓ 3 callersMethodclose
Close connection
database/mongodb_store_base.py:79
↓ 3 callersMethodcreate_store
()
store/zhihu/__init__.py:51
↓ 3 callersMethodcreate_store
()
store/bilibili/__init__.py:48
↓ 3 callersMethodextract_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