钉钉api
This commit is contained in:
@@ -383,27 +383,9 @@ class RSSDataProcessor:
|
||||
return {'success': False, 'message': f'处理失败: {str(e)}'}
|
||||
|
||||
|
||||
def main():
|
||||
"""主函数入口"""
|
||||
try:
|
||||
# 创建处理器实例
|
||||
processor = RSSDataProcessor()
|
||||
|
||||
# 处理RSS数据
|
||||
result = processor.process_rss_data(
|
||||
limit=5000, # 处理最近5000条数据
|
||||
save_to_db=True # 保存到数据库
|
||||
)
|
||||
|
||||
if result['success']:
|
||||
print("RSS数据处理完成!")
|
||||
print(f"处理统计: {result['statistics']}")
|
||||
else:
|
||||
print(f"处理失败: {result['message']}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"程序运行出错: {str(e)}")
|
||||
|
||||
def main(self, limit: int = 1000, save_to_db: bool = True) -> Dict[str, Any]:
|
||||
"""主函数入口(实例方法),对外统一调用"""
|
||||
return self.process_rss_data(limit=limit, save_to_db=save_to_db)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
RSSDataProcessor().main(limit=5000, save_to_db=True)
|
||||
|
||||
Reference in New Issue
Block a user