MCPcopy Create free account

hub / github.com/dataabc/weibo-crawler / functions

Functions127 in github.com/dataabc/weibo-crawler

↓ 10 callersMethodget_filepath
获取结果文件路径
weibo.py:2103
↓ 9 callersMethod_try_get_value
(self, source_name, target_name, dict, json)
weibo.py:2692
↓ 7 callersMethodparse_weibo
(self, weibo_info)
weibo.py:1536
↓ 7 callersMethodupdate_crawl_stats
更新爬取统计
weibo.py:396
↓ 6 callersMethoddownload_files
(self, file_type, weibo_type, wrote_count)
weibo.py:1343
↓ 6 callersMethodget_download_file_names
根据下载规则推导本地文件名,供 Markdown 链接使用
weibo.py:1306
↓ 6 callersMethodget_sqlite_connection
(self)
weibo.py:2770
↓ 6 callersMethodsqlite_insert
(self, con: sqlite3.Connection, data: dict, table: str)
weibo.py:2757
↓ 6 callersMethodstring_to_int
字符串转换为整数
weibo.py:1485
↓ 5 callersMethoddownload_one_file
下载单个文件(图片/视频)
weibo.py:1077
↓ 5 callersMethodis_date
判断日期格式是否为 %Y-%m-%d
weibo.py:546
↓ 5 callersMethodis_datetime
判断日期格式是否为 %Y-%m-%dT%H:%M:%S
weibo.py:538
↓ 4 callersMethod_download_weibo_images
下载单条微博的图片
weibo.py:3000
↓ 4 callersFunctionhandle_config_renaming
(config, oldName, newName)
weibo.py:3519
↓ 4 callersFunctionpush_deer
(append_str)
util/notify.py:5
↓ 3 callersMethod_call_llm_api
调用 LLM API
util/llm_analyzer.py:24
↓ 3 callersMethodget_long_weibo
获取长微博
weibo.py:905
↓ 3 callersMethodget_markdown_image_filenames
根据微博时间和图片数量生成 Markdown 中使用的本地图片文件名
weibo.py:3031
↓ 3 callersMethodget_sqlte_path
(self)
weibo.py:2789
↓ 3 callersMethodmysql_insert
向MySQL表插入或更新数据 Parameters ---------- mysql_config: map MySQL配置表 table: str 要插入的表名
weibo.py:2335
↓ 3 callersMethodrender_markdown_text
将正文中的占位词替换为 Markdown 链接或图片
weibo.py:3054
↓ 3 callersMethodstart
运行爬虫
weibo.py:3493
↓ 3 callersMethodwrite_data
将爬到的信息写入文件或数据库
weibo.py:3299
↓ 2 callersMethod_get_weibo_comments_nocookie
:weibo standardlized weibo :cur_count 已经下载的评论数 :max_count 最大允许下载数 :page 下载的页码 从 1 开始 :on_downloaded 下载完成时的实例
weibo.py:1778
↓ 2 callersMethodanalyze_sentiment
情感分析
util/llm_analyzer.py:56
↓ 2 callersMethodanalyze_weibo
综合分析微博内容
util/llm_analyzer.py:90
↓ 2 callersMethodcalculate_dynamic_delay
计算动态延迟时间
weibo.py:267
↓ 2 callersMethoddetect_anomaly
异常检测
util/llm_analyzer.py:78
↓ 2 callersMethodgenerate_summary
生成摘要
util/llm_analyzer.py:67
↓ 2 callersMethodget_json
(self, params)
weibo.py:554
↓ 2 callersMethodget_pages
获取全部微博
weibo.py:3334
↓ 2 callersMethodget_random_headers
获取随机请求头
weibo.py:353
↓ 2 callersFunctionget_running_task
获取当前运行的任务信息
service.py:71
↓ 2 callersMethodhandle_captcha
处理验证码挑战,提示用户手动完成验证。 参数: js (dict): API 返回的 JSON 数据。 返回: bool: 如果用户成功完成验证码,返回 True;否则返回 False。
weibo.py:568
↓ 2 callersMethodhandle_download
处理下载相关操作
weibo.py:1262
↓ 2 callersMethodinfo_to_mongodb
将爬取的信息写入MongoDB数据库
weibo.py:2270
↓ 2 callersMethodinitialize_info
初始化爬虫信息
weibo.py:3465
↓ 2 callersMethodis_inline_image_url
判断正文中的链接是否直接指向图片资源
weibo.py:968
↓ 2 callersMethodmysql_create
创建MySQL数据库或表
weibo.py:2301
↓ 2 callersMethodmysql_create_table
创建MySQL表
weibo.py:2325
↓ 2 callersMethodnormalize_inline_url
规范化正文中的跳转链接,优先还原 sinaurl 包裹的真实地址
weibo.py:949
↓ 2 callersMethodparse_sqlite_comment
(self, comment, weibo)
weibo.py:2601
↓ 2 callersMethodprint_one_weibo
打印一条微博
weibo.py:1608
↓ 2 callersMethodsqlite_insert_weibo
(self, con: sqlite3.Connection, weibo: dict)
weibo.py:2698
↓ 2 callersMethodstandardize_date
标准化微博发布时间
weibo.py:1497
↓ 2 callersMethodstandardize_info
标准化信息,去除乱码
weibo.py:1520
↓ 1 callersMethod_get_weibo_comments_cookie
:weibo standardlized weibo :cur_count 已经下载的评论数 :max_count 最大允许下载数 :max_id 微博返回的max_id参数 :on_downloaded 下载完成时
weibo.py:1712
↓ 1 callersMethod_get_weibo_reposts_cookie
:weibo standardlized weibo :cur_count 已经下载的转发数 :max_count 最大允许下载数 :page 下载的页码 从 1 开始 :on_downloaded 下载完成时的实例
weibo.py:1832
↓ 1 callersMethodcheck_batch_delay
检查是否需要批次延迟
weibo.py:324
↓ 1 callersFunctioncleanup_old_tasks
清理旧任务,保留最近的MAX_TASKS个任务
service.py:52
↓ 1 callersFunctionconvert_to_days_ago
将日期字符串转换为多少天前的日期字符串
util/dateutil.py:11
↓ 1 callersMethodcreate_sqlite_table
(self, connection: sqlite3.Connection)
weibo.py:2783
↓ 1 callersMethodcsv_helper
将指定信息写入csv文件
weibo.py:2169
↓ 1 callersMethoddownload_markdown_images
为Markdown格式下载图片,使用指定的命名规则
weibo.py:2949
↓ 1 callersMethodexport_comments_to_csv_for_current_user
将当前用户相关的评论从 SQLite 导出到该用户目录下的 CSV 文件
weibo.py:2485
↓ 1 callersMethodformat_blockquote
将多行文本格式化为 Markdown 引用块
weibo.py:3077
↓ 1 callersMethodgenerate_markdown_file
生成单个markdown文件(增量模式)
weibo.py:3098
↓ 1 callersMethodget_article_url
获取微博中头条文章的url
weibo.py:1450
↓ 1 callersMethodget_at_users
获取@用户
weibo.py:1473
↓ 1 callersFunctionget_config
获取配置,允许动态设置user_id_list
service.py:79
↓ 1 callersFunctionget_config
获取配置文件信息(支持JSON5格式)
weibo.py:3524
↓ 1 callersMethodget_inline_image_urls
提取正文中以内嵌链接形式出现的图片 URL
weibo.py:1000
↓ 1 callersMethodget_link_urls
获取正文中的普通链接,保留真实 URL 以便后续检索
weibo.py:975
↓ 1 callersMethodget_live_photo_url
获取Live Photo视频URL
weibo.py:1018
↓ 1 callersMethodget_location
获取微博发布位置
weibo.py:1438
↓ 1 callersMethodget_one_page
获取一页的全部微博
weibo.py:1892
↓ 1 callersMethodget_one_weibo
获取一条微博的全部信息
weibo.py:1638
↓ 1 callersMethodget_page_count
获取微博页数
weibo.py:2050
↓ 1 callersMethodget_pics
获取微博原始图片url
weibo.py:922
↓ 1 callersMethodget_result_headers
获取要写入结果文件的表头
weibo.py:2133
↓ 1 callersMethodget_sqlite_create_sql
(self)
weibo.py:2792
↓ 1 callersMethodget_topics
获取参与的微博话题
weibo.py:1460
↓ 1 callersMethodget_user_config_list
获取文件中的微博id信息
weibo.py:3422
↓ 1 callersMethodget_user_info
获取用户信息
weibo.py:781
↓ 1 callersMethodget_video_url
获取微博普通视频URL
weibo.py:1023
↓ 1 callersMethodget_weibo_comments
:weibo standardlized weibo :max_count 最大允许下载数 :on_downloaded 下载完成时的实例方法回调
weibo.py:1684
↓ 1 callersMethodget_weibo_json
获取网页中微博json数据
weibo.py:606
↓ 1 callersMethodget_weibo_reposts
:weibo standardlized weibo :max_count 最大允许下载数 :on_downloaded 下载完成时的实例方法回调
weibo.py:1698
↓ 1 callersMethodget_write_info
获取要写入的微博信息
weibo.py:2073
↓ 1 callersMethodgroup_weibo_by_config
按配置分组微博
weibo.py:2916
↓ 1 callersMethodinsert_file_sqlite
(self, file_path, weibo_id, url, binary)
weibo.py:1240
↓ 1 callersFunctionload_config
加载配置文件
service.py:27
↓ 1 callersFunctionmain
()
test_llm.py:11
↓ 1 callersFunctionmain
主函数,用于设置定时任务和执行微博爬虫脚本。 Parameters: schedule_interval (int): 循环间隔,以分钟为单位。 Returns: None
__main__.py:11
↓ 1 callersFunctionmain
()
weibo.py:3560
↓ 1 callersMethodmysql_create_database
创建MySQL数据库
weibo.py:2309
↓ 1 callersMethodparse_sqlite_repost
(self, repost, weibo)
weibo.py:2668
↓ 1 callersMethodparse_sqlite_user
(self, user)
weibo.py:2737
↓ 1 callersMethodparse_sqlite_weibo
(self, weibo)
weibo.py:2702
↓ 1 callersMethodperform_anti_ban_rest
执行防封禁休息
weibo.py:423
↓ 1 callersMethodreset_crawl_stats
重置爬取统计(休息后调用)
weibo.py:411
↓ 1 callersMethodsave_cookies_to_file
将 Session 中最新的 Cookie 写回文件
weibo.py:3473
↓ 1 callersMethodsend_post_request_with_token
(self, url, data, token, max_retries, backoff_factor)
weibo.py:2234
↓ 1 callersMethodset_file_time
(self, file_path, time_str)
weibo.py:1064
↓ 1 callersMethodshould_pause_session
检查是否应该暂停当前会话
weibo.py:292
↓ 1 callersMethodsqlite_exist_file
(self, url)
weibo.py:1226
↓ 1 callersMethodsqlite_insert_user
(self, con: sqlite3.Connection, user: dict)
weibo.py:2733
↓ 1 callersMethodupdate_json_data
更新要写入json结果文件中的数据,已经存在于json中的信息更新为最新值,不存在的信息添加到data中
weibo.py:2195
↓ 1 callersMethodupdate_user_config_file
更新用户配置文件
weibo.py:2876
↓ 1 callersMethoduser_to_csv
将爬取到的用户信息写入csv文件
weibo.py:672
next →1–100 of 127, ranked by callers