From 924b7355af4d4608da59bfaa36a37d5384938bdc Mon Sep 17 00:00:00 2001 From: LibraHp_0928 <1941163264@qq.com> Date: Thu, 12 Sep 2024 23:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 ++++++--- main.py | 6 +----- util/ToolsUtil.py | 26 ++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 12fb9fe..af9e638 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ +.idea +**/.DS_Store +**/__pycache__/ +/myenv/ resource/temp resource/result resource/user -.idea -util/__pycache__ -/myenv/ +resource/fetch-all + diff --git a/main.py b/main.py index ea0e980..d9551a0 100644 --- a/main.py +++ b/main.py @@ -23,11 +23,6 @@ def signal_handler(signal, frame): -def save_data(): - df = pd.DataFrame(texts, columns=['时间', '内容']) - df.to_excel(Config.result_path + Request.uin + '.xlsx', index=False) - print('导出成功,请查看 ' + Config.result_path + Request.uin + '.xlsx') - def save_data(): user_save_path = Config.result_path + Request.uin + '/' pic_save_path = user_save_path + 'pic/' @@ -69,6 +64,7 @@ def save_data(): pd.DataFrame(forward_message, columns=['时间', '内容', '图片链接']).to_excel(user_save_path + Request.uin + '_转发列表.xlsx', index=False) pd.DataFrame(leave_message, columns=['时间', '内容', '图片链接']).to_excel(user_save_path + Request.uin + '_留言列表.xlsx', index=False) pd.DataFrame(other_message, columns=['时间', '内容', '图片链接']).to_excel(user_save_path + Request.uin + '_其他列表.xlsx', index=False) + Tools.show_author_info() print('\033[36m' + '导出成功,请查看 ' + user_save_path + Request.uin + ' 文件夹内容' + '\033[0m') print('\033[32m' + '共有 ' + str(len(texts)) + ' 条消息' + '\033[0m') print('\033[36m' + '最早的一条说说发布在' + texts[texts.__len__() - 1][0] + '\033[0m') diff --git a/util/ToolsUtil.py b/util/ToolsUtil.py index 2c5035d..7f704c2 100644 --- a/util/ToolsUtil.py +++ b/util/ToolsUtil.py @@ -29,3 +29,29 @@ def process_old_html(message): new_text = extract_string_between(new_text, start_string, end_string) new_text = replace_multiple_spaces(new_text).replace('\\', '') return new_text + + +def show_author_info(): + CYAN = '\033[36m' + YELLOW = '\033[33m' + BLUE = '\033[34m' + RESET = '\033[0m' + RED = '\033[31m' + + author_art = r''' +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓███████▓▒░ ░▒▓████████▓▒░ ░▒▓████████▓▒░ ░▒▓███████▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ +░▒▓████████▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ +''' + + print(CYAN + author_art + RESET) + + author_info = f"{YELLOW}bilibili{RESET} {BLUE}@高数带我飞{RESET} {YELLOW}GetQzonehistory V1.0{RESET}" + print(author_info) + print(f'{RED}程序完全免费,且在github开源!!!!{RESET}') + print(f'{RED}程序完全免费,且在github开源!!!!{RESET}') + print(f'{RED}程序完全免费,且在github开源!!!!{RESET}') \ No newline at end of file