File tree Expand file tree Collapse file tree
src/funread/legado/manage/download Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
22name = " funread"
3- version = " 1.1.27 "
3+ version = " 1.1.28 "
44description = " 一个用于管理和处理阅读源(Legado 阅读 APP 的书源和 RSS 源)的 Python 工具库"
55readme = " README.md"
66requires-python = " >=3.8"
Original file line number Diff line number Diff line change 55from funfile import funos
66from funsecret import read_secret
77from funtask import Task
8+ from funutil import getLogger
9+
810from funread .legado .manage .download .rss import RSSSourceDownload
911
12+ logger = getLogger ("funread" )
1013"""
1114dominate example: https://blog.csdn.net/wumingxiaoyao/article/details/122894671
1215"""
@@ -171,17 +174,18 @@ def split_and_upload(self):
171174 i = 1000
172175 for data in runner .export_sources (size = 3000 ):
173176 if len (data ) > 0 :
174- self .drive .upload_file (
175- content = data , git_path = f"{ self .dir_path } /progress-{ i } .json"
176- )
177+ git_path = f"{ self .dir_path } /progress-{ i } .json"
178+ self .drive .upload_file (content = data , git_path = git_path )
177179 i += 1
180+ logger .success (f"dump { len (data )} into { git_path } " )
181+ else :
182+ continue
178183
179184 def update_rss (self ):
180- print ("update source rss" )
185+ logger . info ("update source rss" )
181186 self .drive .upload_file (
182187 git_path = f"{ self .dir_path } /index.html" , content = self .generate_html_report ()
183188 )
184- print (len (self .generate_html_report ()))
185189
186190
187191class GenerateSourceTask (Task ):
You can’t perform that action at this time.
0 commit comments