From cc2b96b09278c9f38a964c02412b71b2822ff821 Mon Sep 17 00:00:00 2001 From: CriptDit <1487413334@qq.com> Date: Mon, 27 May 2024 11:50:16 +0800 Subject: [PATCH] first commit --- pythonProject1/.idea/.gitignore | 8 + .../inspectionProfiles/profiles_settings.xml | 6 + pythonProject1/.idea/misc.xml | 4 + pythonProject1/.idea/modules.xml | 8 + pythonProject1/.idea/pythonProject1.iml | 10 + pythonProject1/TrialRecommend/DataRequest.py | 111 +++++ pythonProject1/TrialRecommend/LoginCheck.py | 28 ++ pythonProject1/TrialRecommend/LoginPage.py | 58 +++ pythonProject1/TrialRecommend/Main.py | 396 ++++++++++++++++++ .../TrialRecommend/Notes_Request.py | 75 ++++ .../__pycache__/DataRequest.cpython-312.pyc | Bin 0 -> 6039 bytes .../__pycache__/LoginCheck.cpython-312.pyc | Bin 0 -> 1577 bytes .../__pycache__/Main.cpython-312.pyc | Bin 0 -> 25670 bytes .../__pycache__/Notes_Request.cpython-312.pyc | Bin 0 -> 3756 bytes .../__pycache__/func_collec.cpython-312.pyc | Bin 0 -> 1844 bytes pythonProject1/TrialRecommend/data.csv | 10 + pythonProject1/TrialRecommend/func_collec.py | 36 ++ pythonProject1/TrialRecommend/notes.csv | 2 + pythonProject1/URL.txt | 5 + 19 files changed, 757 insertions(+) create mode 100644 pythonProject1/.idea/.gitignore create mode 100644 pythonProject1/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 pythonProject1/.idea/misc.xml create mode 100644 pythonProject1/.idea/modules.xml create mode 100644 pythonProject1/.idea/pythonProject1.iml create mode 100644 pythonProject1/TrialRecommend/DataRequest.py create mode 100644 pythonProject1/TrialRecommend/LoginCheck.py create mode 100644 pythonProject1/TrialRecommend/LoginPage.py create mode 100644 pythonProject1/TrialRecommend/Main.py create mode 100644 pythonProject1/TrialRecommend/Notes_Request.py create mode 100644 pythonProject1/TrialRecommend/__pycache__/DataRequest.cpython-312.pyc create mode 100644 pythonProject1/TrialRecommend/__pycache__/LoginCheck.cpython-312.pyc create mode 100644 pythonProject1/TrialRecommend/__pycache__/Main.cpython-312.pyc create mode 100644 pythonProject1/TrialRecommend/__pycache__/Notes_Request.cpython-312.pyc create mode 100644 pythonProject1/TrialRecommend/__pycache__/func_collec.cpython-312.pyc create mode 100644 pythonProject1/TrialRecommend/data.csv create mode 100644 pythonProject1/TrialRecommend/func_collec.py create mode 100644 pythonProject1/TrialRecommend/notes.csv create mode 100644 pythonProject1/URL.txt diff --git a/pythonProject1/.idea/.gitignore b/pythonProject1/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/pythonProject1/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/pythonProject1/.idea/inspectionProfiles/profiles_settings.xml b/pythonProject1/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/pythonProject1/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/pythonProject1/.idea/misc.xml b/pythonProject1/.idea/misc.xml new file mode 100644 index 0000000..5885df1 --- /dev/null +++ b/pythonProject1/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/pythonProject1/.idea/modules.xml b/pythonProject1/.idea/modules.xml new file mode 100644 index 0000000..fdd8fdf --- /dev/null +++ b/pythonProject1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/pythonProject1/.idea/pythonProject1.iml b/pythonProject1/.idea/pythonProject1.iml new file mode 100644 index 0000000..79f77b6 --- /dev/null +++ b/pythonProject1/.idea/pythonProject1.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pythonProject1/TrialRecommend/DataRequest.py b/pythonProject1/TrialRecommend/DataRequest.py new file mode 100644 index 0000000..cf50f49 --- /dev/null +++ b/pythonProject1/TrialRecommend/DataRequest.py @@ -0,0 +1,111 @@ +import csv +import random +from DrissionPage import ChromiumOptions +from DrissionPage import ChromiumPage +import time + +path=r"C:\Program Files\Google\Chrome\Application\chrome.exe" +ChromiumOptions().set_browser_path(path).save() + +class DataRequest: + def __init__(self,keyword): + #创建文件对象 + self.success='False' + self.resp = None + self.data_csv_file_path= 'data.csv' + self.notes_csv_file_path= 'notes.csv' + #初始化 清空文档 + self.clear_csv_file() + self.f=open('data.csv', mode='a+', encoding='utf-8', newline='') + self.csv_writer=csv.DictWriter(self.f,fieldnames=['文章ID','文章标题','喜欢数量','图片资源']) + # + self.keyword=keyword + self.url='https://www.xiaohongshu.com/search_result?keyword='+self.keyword+'&type=51' + #数据 + self.items=[] + #打开浏览器 + self.drive=ChromiumPage() + self.drive.set.scroll.smooth(on_off=True) + self.drive.set.scroll.wait_complete(on_off=True) + # 监听数据报 + self.drive.listen.start('api/sns/web/v1/search/notes') + #访问网站 + self.drive.get(self.url) + self.dataRequest() + + def clear_csv_file(self): + with open(self.data_csv_file_path, 'w') as file1: # 使用'w'模式打开文件 + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + with open(self.notes_csv_file_path,'w') as file2: + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + + def dataRequest(self): + #滚动到底部刷新数据包 + self.drive.scroll.to_bottom() + #等待数据包加载 + self.resp=self.drive.listen.wait() + #获取数据包返回的数据 + json_data=self.resp.response.body + + #分析数据放入容器 + for item in json_data['data']['items']: + if '-' not in item['id']: + if 'display_title' in item['note_card']: + self.success = 'True' + time_Images=[] + for image_list in item['note_card']['image_list']: + time_Images.append(image_list['info_list'][0]['url']) + + dic={ + '文章ID':item['id'], + '文章标题':item['note_card']['display_title'], + '喜欢数量':item['note_card']['interact_info']['liked_count'], + '图片资源':time_Images + } + self.items.append(dic) + else: + self.success = 'False' + break + if self.success == 'True': + self.sort() + self.check() + + def is_in_csv(self,data_to_check): + with open(self.data_csv_file_path,'r',encoding='utf-8') as f: + csv_reader=csv.reader(f) + for row in csv_reader: + if data_to_check in row: + return True + return False + + def sort(self): + #按照喜欢人数排序 + self.items.sort(key=lambda item:int(item['喜欢数量']),reverse=True) + for i in self.items: + if self.is_in_csv(i['文章ID']): + continue + else: + self.csv_writer.writerow(i) + + def close(self): + self.drive.listen.stop() + self.f.close() + def check(self): + with open('data.csv', mode='r', encoding='utf-8') as file: + for line in file: + if line==None: + print('数据获取失败') + break + else: + print('数据获取成功') + break + + # print('[1]:',line.split(',')[1]) + # break + +if __name__=='__main__': + dataRequest=DataRequest('厦门旅游攻略') + for i in range(1): + dataRequest.dataRequest() + time.sleep(random.randint(3,4)) + diff --git a/pythonProject1/TrialRecommend/LoginCheck.py b/pythonProject1/TrialRecommend/LoginCheck.py new file mode 100644 index 0000000..b08d1da --- /dev/null +++ b/pythonProject1/TrialRecommend/LoginCheck.py @@ -0,0 +1,28 @@ +import mysql.connector +class Login_check(): + db=mysql.connector.connect( + host="localhost", + user="root", + passwd="A121023020309a", + database="trial" + ) + # 创建游标对象,用于执行SQL查询 + cursor = db.cursor() + @classmethod + def check(self,id,psw): + sql = "SELECT * FROM user WHERE id = %s AND psw = %s" + self.cursor.execute(sql,(id,psw)) + # 获取查询结果 + results = self.cursor.fetchall() + for row in results: + if id==row[0] and psw==row[1]: + return True + return False + @classmethod + def close(self): + self.cursor.close() # 关闭游标 + print('游标已关闭') + self.db.close() # 关闭数据库连接 + print('数据库已关闭') + +login_check = Login_check() \ No newline at end of file diff --git a/pythonProject1/TrialRecommend/LoginPage.py b/pythonProject1/TrialRecommend/LoginPage.py new file mode 100644 index 0000000..9992ee9 --- /dev/null +++ b/pythonProject1/TrialRecommend/LoginPage.py @@ -0,0 +1,58 @@ +import tkinter as tk +from tkinter import messagebox +from TrialRecommend.LoginCheck import login_check +from Main import Mainpage + +class Login_page(): + + def __init__(self,master): + self.data_csv_file_path='data.csv' + self.notes_csv_file_path='notes.csv' + self.root=master + self.username = tk.StringVar() + self.password = tk.StringVar() + self.page=tk.Frame(self.root) + self.page.pack() + + tk.Label(self.page).grid(row=0, column=0) + tk.Label(self.page,text='账户:').grid(row=1, column=1,pady=10) + tk.Entry(self.page,textvariable=self.username).grid(row=1, column=2) + tk.Label(self.page, text='密码:').grid(row=2, column=1,pady=10) + tk.Entry(self.page,textvariable=self.password,show='*').grid(row=2, column=2) + tk.Button(self.page,text='登录',command=self.check).grid(row=3, column=1,pady=10) + tk.Button(self.page,text='退出',command=self.page.quit).grid(row=3, column=3,pady=10) + self.center_window() # 调用函数来居中窗口 + self.root.title('旅游推荐系统登录界面') + + def check(self): + name = self.username.get() + psw = self.password.get() + if login_check.check(name, psw): + messagebox.showinfo(title='提示', message='登录成功') + self.page.destroy() + Mainpage(self.root,name) + else: + messagebox.showwarning(title='警告', message='用户名或密码错误') + def center_window(self, width=400, height=200): + # 获取屏幕宽度和高度 + screen_width = self.root.winfo_screenwidth() + screen_height = self.root.winfo_screenheight() + + # 计算窗口的左上角应该放置的位置 + left = (screen_width / 2) - (width / 2) + top = (screen_height / 2) - (height / 2) + + # 设置窗口的位置和大小 + root.geometry("{0}x{1}+{2}+{3}".format(width, height, int(left), int(top))) + + def clear_csv_file(self): + with open(self.data_csv_file_path, 'w') as file1: # 使用'w'模式打开文件 + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + with open(self.notes_csv_file_path, 'w') as file2: + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + +if __name__ == '__main__': + root = tk.Tk() + login=Login_page(root) + root.mainloop() + login.clear_csv_file() \ No newline at end of file diff --git a/pythonProject1/TrialRecommend/Main.py b/pythonProject1/TrialRecommend/Main.py new file mode 100644 index 0000000..bf72080 --- /dev/null +++ b/pythonProject1/TrialRecommend/Main.py @@ -0,0 +1,396 @@ +import csv +import random +import time +import tkinter as tk +from io import BytesIO +from tkinter import messagebox + +import requests +from PIL import Image, ImageTk +from TrialRecommend import DataRequest, Notes_Request + +import func_collec +class Mainpage: + def __init__(self,master,name): + self.content = '' + self.time = '' + self.collect = '' + self.likes = '' + self.share = '' + + self.flag = 0 + self.is_pre = 'False' + + self.current_data_index = 0 + self.current_data_image_index = 0 + self.current_notes_index = 0 + self.max_data_count = 0 + self.max_notes_count = 0 + self.max_iamge_count = 0 + + self.data_csv_file_path = 'data.csv' + self.notes_csv_file_path = 'notes.csv' + self.data_request = None + self.research = tk.StringVar() + self.user = name + self.root = master + self.root.title('推荐中心 v0.0.1') + # 调用函数来居中窗口 + self.center_window(self.root) + self.init_main_Page() + + def init_main_Page(self): + self.page = tk.Frame(self.root) + self.page.place(relx=0, rely=0, relheight=1, relwidth=1) + + + self.btn_exit = tk.Button(self.page, text='退出', command=self.exit, bg='#D7EFFF', fg='red',font='bold') + self.btn_exit.place(relx=0.9, rely=0.9, relheight=0.05, relwidth=0.07) + + self.lable_user = tk.Label(self.page, text='欢迎您:' + self.user, fg='green', font=24) + self.lable_user.place(relx=0.86, rely=0, relheight=0.08, relwidth=0.13) + + self.text = tk.Text(self.page, bg='#ADD9FE', font=18) + self.text.insert(tk.END, self.content) + self.text.config(state=tk.DISABLED, cursor='') + self.text.place(relx=0.58, rely=0.07, relheight=0.86, relwidth=0.3) + + self.btn_Image_pre=tk.Button(self.page,text='上一张',bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.pre_image) + self.btn_Image_pre.place(relx=0.14, rely=0.01, relheight=0.05, relwidth=0.07) + + self.btn_Image_next = tk.Button(self.page, text='下一张', bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.next_image) + self.btn_Image_next.place(relx=0.24, rely=0.01, relheight=0.05, relwidth=0.07) + + self.btn_liked_page = tk.Button(self.page, text='我的收藏夹', bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.to_like_page) + self.btn_liked_page.place(relx=0.9, rely=0.1, relheight=0.05, relwidth=0.1) + + self.btn_next = tk.Button(self.page, text='下一篇', bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.next_data) + self.btn_next.place(relx=0.45, rely=0.45, relheight=0.08, relwidth=0.09) + + self.btn_pre = tk.Button(self.page, text='上一篇', bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.back_data) + self.btn_pre.place(relx=0.45, rely=0.35, relheight=0.08, relwidth=0.09) + + self.btn_liked = tk.Button(self.page, text='收藏攻略', bg='#D7EFFF',font=('SimHei',15,'bold'),command=self.func_collect) + self.btn_liked.place(relx=0.9, rely=0.2, relheight=0.05, relwidth=0.1) + + self.btn_dis_liked = tk.Button(self.page, text='取消收藏', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_dis_liked.place(relx=0.9, rely=0.3, relheight=0.05, relwidth=0.1) + + self.lable_like=tk.Label(self.page,text='喜欢人数:'+self.likes,font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.05, rely=0.93) + + self.lable_like = tk.Label(self.page, text='收藏人数:'+self.collect,font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.17, rely=0.93) + + self.lable_like = tk.Label(self.page, text='转发人数:'+self.share,font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.29, rely=0.93) + + self.entry=tk.Entry(self.page,textvariable=self.research,font=('',20, "bold")) + self.entry.place(relx=0.35, rely=0.01, relheight=0.05, relwidth=0.3) + + self.btn_research=tk.Button(self.page,text='搜索', bg='#D7EFFF',font=("SimHei",20, "bold"),command=self.researchPage) + self.btn_research.place(relx=0.66, rely=0.01, relheight=0.05, relwidth=0.1) + + self.lable_time=tk.Label(self.page,text='发布时间:'+self.time,font=('SimHei',15,'bold')) + self.lable_time.place(relx=0.41, rely=0.93) + + def to_init_page(self): + self.page2.destroy() + self.init_text() + self.init_main_Page() + self.update_max() + self.image_url(self.current_data_index, self.current_data_image_index) + def to_like_page(self): + self.page.destroy() + self.init_like_page() + + def init_like_page(self): + self.page2=tk.Frame(self.root) + self.page2.place(relx=0,rely=0,relheight=1,relwidth=1) + + self.btn_init_page = tk.Button(self.page2, text='返回主页面',command=self.to_init_page, bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_init_page.place(relx=0.9, rely=0.1, relheight=0.05, relwidth=0.1) + + self.lable_user = tk.Label(self.page2, text='欢迎您:' + self.user, fg='green', font=24) + self.lable_user.place(relx=0.86, rely=0, relheight=0.08, relwidth=0.13) + + self.btn_exit = tk.Button(self.page2, text='退出', command=self.exit, bg='#D7EFFF', fg='red',font='bold') + self.btn_exit.place(relx=0.9, rely=0.9, relheight=0.05, relwidth=0.07) + + self.text = tk.Text(self.page2, bg='#ADD9FE', font=18) + self.text.insert(tk.END, '收藏页面') + self.text.config(state=tk.DISABLED, cursor='') + self.text.place(relx=0.58, rely=0.07, relheight=0.86, relwidth=0.3) + + self.btn_Image_pre = tk.Button(self.page2, text='上一张', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_Image_pre.place(relx=0.14, rely=0.01, relheight=0.05, relwidth=0.07) + + self.btn_Image_next = tk.Button(self.page2, text='下一张', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_Image_next.place(relx=0.24, rely=0.01, relheight=0.05, relwidth=0.07) + + self.btn_next = tk.Button(self.page2, text='下一篇', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_next.place(relx=0.45, rely=0.45, relheight=0.08, relwidth=0.09) + + self.btn_pre = tk.Button(self.page2, text='上一篇', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_pre.place(relx=0.45, rely=0.35, relheight=0.08, relwidth=0.09) + + self.btn_liked = tk.Button(self.page2, text='收藏攻略', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_liked.place(relx=0.9, rely=0.2, relheight=0.05, relwidth=0.1) + + self.btn_dis_liked = tk.Button(self.page2, text='取消收藏', bg='#D7EFFF',font=('SimHei',15,'bold')) + self.btn_dis_liked.place(relx=0.9, rely=0.3, relheight=0.05, relwidth=0.1) + + self.lable_like = tk.Label(self.page2, text='喜欢人数:', font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.05, rely=0.93) + + self.lable_like = tk.Label(self.page2, text='收藏人数:', font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.17, rely=0.93) + + self.lable_like = tk.Label(self.page2, text='转发人数:', font=('SimHei',15,'bold')) + self.lable_like.place(relx=0.29, rely=0.93) + def notes_request(self,next_back): + if next_back == 'next': + if self.current_data_index + 1 <= self.max_data_count: + with open('data.csv', 'r', encoding='utf-8') as f: + if self.current_notes_index!=self.flag: + self.current_notes_index += 1 + self.current_data_index += 1 + else: + self.current_notes_index += 1 + self.current_data_index += 1 + self.flag=self.current_notes_index + csv_reader = csv.reader(f) + data='' + i=0 + for row in csv_reader: + if i == self.current_data_index: + data = row[0] + break + i += 1 + if self.is_pre=='False': + Notes_Request.notes_request(data) + if self.flag==self.current_notes_index: + self.is_pre='False' + time.sleep(random.uniform(0, 1)) + self.update_max() + print(self.max_data_count, self.current_data_index, self.current_data_image_index) + self.init_text() + self.init_main_Page() + self.image_show() + else: + messagebox.showinfo(message='正在载入新的一批数据,请稍等!') + self.data_request.dataRequest() + if self.data_request.success == 'True': + time.sleep(random.uniform(1, 2)) + with open('data.csv', 'r', encoding='utf-8') as f: + if self.current_notes_index != self.flag: + self.current_notes_index += 1 + self.current_data_index += 1 + else: + self.current_notes_index += 1 + self.current_data_index += 1 + self.flag = self.current_notes_index + csv_reader = csv.reader(f) + data='' + i=0 + for row in csv_reader: + if i == self.current_data_index: + data = row[0] + i += 1 + if self.is_pre == 'False': + Notes_Request.notes_request(data) + if self.flag == self.current_notes_index: + self.is_pre = 'True' + time.sleep(random.uniform(0, 1)) + self.update_max() + print(self.max_data_count, self.current_data_index, self.current_data_image_index) + self.init_text() + self.init_main_Page() + self.image_show() + else: + messagebox.showinfo(message='网络请求失败,请稍后尝试!') + + if next_back == 'back': + if self.current_notes_index-1<0: + messagebox.showinfo(message='这是第一篇文章') + else: + self.is_pre = 'True' + self.current_notes_index -= 1 + self.current_data_index -= 1 + with open('data.csv', 'r', encoding='utf-8') as f: + csv_reader = csv.reader(f) + first_row = '' + i=0 + for row in csv_reader: + if i==self.current_data_index: + first_row=row[0] + i += 1 + Notes_Request.notes_request(first_row) + time.sleep(random.uniform(0, 1)) + self.update_max() + print(self.max_data_count, self.current_data_index, self.current_data_image_index) + self.init_text() + self.init_main_Page() + self.image_show() + # 返回上一篇 + def back_data(self): + if self.max_data_count != 0: + self.current_data_image_index = 0 + self.notes_request('back') + else: + messagebox.showinfo(message='请先搜索') + # 下一篇 + def next_data(self): + if self.max_data_count != 0: + self.current_data_image_index = 0 + self.notes_request('next') + else: + messagebox.showinfo(message='请先搜索') + # 下一张图片 + def next_image(self): + + if self.max_iamge_count == 0: + messagebox.showinfo(message='请先搜索') + elif self.current_data_image_index + 1 >= self.max_iamge_count: + messagebox.showinfo(message='这是最后一张') + else: + self.current_data_image_index += 1 + self.image_url(self.current_data_index, self.current_data_image_index) + # 上一张图片 + def pre_image(self): + if self.max_iamge_count == 0: + messagebox.showinfo(message='请先搜索') + elif self.current_data_image_index - 1 < 0: + messagebox.showinfo(title='提示', message='没有上一张了') + else: + self.current_data_image_index -= 1 + self.image_url(self.current_data_index, self.current_data_image_index) + def researchPage(self): + self.clear_csv_file() + rs=self.research.get() + if rs=='': + messagebox.showinfo(title='提示', message='你还没有输入任何东西!') + else: + if DataRequest.DataRequest(str(self.research.get())).success=='True': + self.data_request = DataRequest.DataRequest(str(self.research.get())) + time.sleep(random.uniform(0,1)) + self.init_notes_request() + else: + messagebox.showinfo(message='网络请求失败,请稍后尝试!') + def init_notes_request(self): + with open('data.csv', 'r', encoding='utf-8') as f: + reader = csv.reader(f) + for row in reader: + Notes_Request.notes_request(row[0]) + break + self.update_max() + self.init_text() + self.init_main_Page() + self.image_show() + def image_url(self,index,col): + with open(self.data_csv_file_path,'r',encoding='utf-8') as f: + reader = csv.reader(f) + row ='' + i=0 + for rows in reader: + if i==self.current_data_index: + row=rows + i += 1 + self.load_image_from_url(self.page,eval(row[3])[col]) + def load_image_from_url(self,View,url): + # 使用requests从URL下载图片 + response = requests.get(url) + img = Image.open(BytesIO(response.content)) + img = img.resize((450, 600), Image.BICUBIC) # 调整像素,使用高质量重采样算法 + # 使用PIL的ImageTk将PIL图片转换为Tkinter可以显示的格式 + tk_img = ImageTk.PhotoImage(img) + + # 创建一个标签来显示图片,并添加到Tkinter窗口中 + label = tk.Label(View, image=tk_img) + label.image = tk_img # 保持对tk_img的引用,防止被垃圾回收 + label.place(relx=0.05, rely=0.07) + def image_show(self): + if self.csv_is_empty(): + messagebox.showinfo('提示',message='数据加载失败') + else: + self.image_url(self.current_data_index,0) + def csv_is_empty(self): + with open('notes.csv','r',encoding='utf-8') as f2: + rows = [] + reader = csv.reader(f2) + for row in reader: + # 如果找到非空行,则将rows列表设置为非空 + if any(row): + rows.append(row) + return False # 如果只需要检查是否至少有一行非空,则可以提前退出循环 + # 如果rows列表为空,则CSV文件是空的(或只包含空行) + if len(rows) == 0: + print('notes 无数据') + return True + def init_text(self): + with open(self.notes_csv_file_path,'r',encoding='utf-8') as f: + reader = csv.reader(f) + index=0 + for row in reader: + if index==self.current_notes_index: + title = row[0] + text = row[1].replace('
', '\n').replace('.
', '') + self.content=title+text + self.time = row[2] + self.collect = row[3] + self.likes = row[4] + self.share = row[5] + index += 1 + def update_max(self): + with open(self.data_csv_file_path,'r',encoding='utf-8') as f: + reader = csv.reader(f) + index=0 + for row in reader: + if index==self.current_data_index: + self.max_iamge_count = len(eval(row[3])) + break + index+=1 + + with open(self.data_csv_file_path, 'r', encoding='utf-8') as f: + reader = csv.reader(f) + counts = 0 + for i in reader: + counts += 1 + self.max_data_count = counts + + with open(self.notes_csv_file_path,'r',encoding='utf-8') as f: + reader = csv.reader(f) + counts=0 + for i in reader: + counts+=1 + self.max_notes_count=counts + def clear_csv_file(self): + with open(self.data_csv_file_path, 'w') as file1: # 使用'w'模式打开文件 + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + with open(self.notes_csv_file_path, 'w') as file2: + pass # 不需要执行任何操作,因为打开文件时内容已被清空 + def exit(self): + messagebox.showinfo(title='提示', message='欢迎下次使用!') + self.root.quit() + def center_window(self, root, width=1300, height=700): + # 获取屏幕宽度和高度 + screen_width = root.winfo_screenwidth() + screen_height = root.winfo_screenheight() + + # 计算窗口的左上角应该放置的位置 + left = (screen_width / 2) - (width / 2) + top = (screen_height / 2) - (height / 2) + + # 设置窗口的位置和大小 + root.geometry("{0}x{1}+{2}+{3}".format(width, height, int(left), int(top))) + + def func_collect(self): + if self.max_data_count!=0: + func_collec.collec(self.user, self.current_data_index) + else: + messagebox.showinfo('提示','请先搜索') + +if __name__ == '__main__': + root = tk.Tk() + Mainpage(master=root,name='Null') + root.mainloop() diff --git a/pythonProject1/TrialRecommend/Notes_Request.py b/pythonProject1/TrialRecommend/Notes_Request.py new file mode 100644 index 0000000..10df68f --- /dev/null +++ b/pythonProject1/TrialRecommend/Notes_Request.py @@ -0,0 +1,75 @@ +import json +import re +from csv import DictWriter, DictReader +import requests +from bs4 import BeautifulSoup + +def notes_request(url): + url='https://www.xiaohongshu.com/explore/'+url + headers = { + 'authority':'edith.xiaohongshu.com', + 'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', + 'Accept-Language':'zh-CN,zh;q=0.9', + 'Content-Type':'text/html; charset=utf-8', + 'Origin':'https://www.xiaohongshu.com', + 'Referer':'https://www.xiaohongshu.com', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'} + cookies = { + 'abRequestId':'a3c8a855-ed85-57f6-91fe-3e0acedffde8', + 'a1':'18f9b67ecdbh41bri2la0dgguminrd7dmmrk4pxf750000215521', + 'webId':'6d97ebd3e6051489537e7a6aa1d1cf99', + 'gid':'yYijDKYydJ6JyYijDKWdS6UCfDx4yDF3J108FiWfkk763T28IFfWf4888Jy22Jy8WYf0SyjD', + 'webBuild':'4.16.1', + 'web_session':'040069b3643d32585fff79ee79344bd4b89bc6', + 'acw_tc':'25f299cc55249ae472ab6eab4f8404ce338ad4b4544c7f87a592375d787ede3a', + 'websectiga':'16f444b9ff5e3d7e258b5f7674489196303a0b160e16647c6c2b4dcb609f4134', + 'sec_poison_id':'9e6926ce-0bb8-4335-992a-0ec7875fff69', + 'xsecappid':'xhs-pc-web' + + } + f=open('notes.csv', mode='a+', encoding='utf-8', newline='') + csv_writer=DictWriter(f,fieldnames=['标题','内容','发布时间','收藏数','喜欢数','分享数']) + + response = requests.get(url=url, headers=headers, cookies=cookies) + soup = BeautifulSoup(response.text, 'lxml') + long_string=soup.prettify() + pattern = r'"interactInfo":{[^}]*}' + match = re.search(pattern, long_string) + js=match.group(0)[15:] + #将字符串转化为字典 + data_dict = json.loads(js) + + if '请输入验证码' in soup.text: + print('需要输入验证码或更新Cookie') + else: + title = soup.find('title').text + publish_time = soup.find('span', class_='date').text + collectedCount=data_dict['collectedCount'] + likedCount=data_dict['likedCount'] + shareCount=data_dict['shareCount'] + # 找到目标div并获取其所有内容(包括
标签) + desc_div = soup.find('div', class_='desc') + # 使用正则表达式匹配标签内的文本 + match = re.findall(r']*="">.*?<\/span>', str(desc_div.contents)) + if match: + for text_inside in match: + if ' 'not in text_inside and len(text_inside)>50 and 'class="note-content-user"' not in text_inside: + pattern = r'="">(.*?)<\/span>' + text_inside = re.findall(pattern, text_inside) + dic={ + '标题':title.replace('- 小红书',''), + '内容':text_inside[0], + '发布时间':publish_time, + '收藏数':collectedCount, + '喜欢数':likedCount, + '分享数':shareCount + } + csv_writer.writerow(dic) + print('笔记拉取成功') + break + + f.close() + + +if __name__ == '__main__': + notes_request('654a541e000000001e029a6a') diff --git a/pythonProject1/TrialRecommend/__pycache__/DataRequest.cpython-312.pyc b/pythonProject1/TrialRecommend/__pycache__/DataRequest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..567898c291cee24b31649ff0700b01ffaab5ad87 GIT binary patch literal 6039 zcmbstZA={3@$K#I-QID>9S4Lj+kn9~2Q~!9&WCH05aXn_Q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ad$cv_Eu46D?A4jjtm|TI!Mi)@E4||@n)Xh47kzb_uWqj3rmx{X7~XEvLEy4j zA6kH6LnDBEs|}^>#1g_XmqlbE-}kqJj0{)+(+Sy6d3^bBR8}O|SR+7W zHkQ5&+(QM~3uth509n}qV1%UdeJi2grU~23%zeT>W}k46xnIlQye??P#=5)-NVf5b z47|Rum$@t_33(Nqlq$@nAa5bYvztdvpF1%t3xTX7KdUAEz=z2=<|7+Z{>>?SIyHB+ zQ+%SK=$B0YXrq`38cwp$4;WmumtOnh*ROwkcjE24zx&hIAAPWiyfiv__m}U2ZDJmy z^9hQlCzaiEnBD6f-tO1u_J@IY!;)iOa0gR3~<}u%Ga)4o7>y zh1XGhCB^O*H~;q4TOZs*!@Y-=agPHK@X=KG3dKb^rn}o{L{Z=&6CXY) zvYBrK941yeXFNvu;DI1`8UvU_&F2YD34t3j2LCe@!MW-@4aGsnPYhg%N>T#c74!o8 zOGC(ose&12-f%T&XeY{{rVl B|Hl9T literal 0 HcmV?d00001 diff --git a/pythonProject1/TrialRecommend/__pycache__/LoginCheck.cpython-312.pyc b/pythonProject1/TrialRecommend/__pycache__/LoginCheck.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..639ad86ae49dee319c27be0bf9b2a2ebfeecc057 GIT binary patch literal 1577 zcmZ`(&2Jk;6rcU{I*#qcRZ0?9$*Pp7OGT6qR0%{Y6(@m1F(^c;YEoI-oe8nC_Bu0b z1xJpWil8Q>D6J53BrfKNQV@az75@SkB7$ND4wXuf6QcujRKVr4%9Nxb7+xOnQ zdA~RFYcSXW*y{f@Hg`h;;2&-@m)uZl!%Qgw2%untgdl=<02J2%ly=0rM?w?<5_cNz z38^3$@)5VuJ0IVo1n*zl?=DBbY03zJ)EQ$<~ z+K?Ur6l56`6hn_L3e$So#T!IRLHb*Z9tZUr_1`&x8Yi*Cotk#el8?P$U9=M3o#)WnC)5+lGL7 z1mQL6xR*(Mj)`a3;6ZFe0U2e2vC$-=Z&&Nv)1rTC!QVoIdz#J}@@@FGf*Zm6VGlk3 zhxRh=XHjt@K(%BtYi3X~Njs9sj05vF*E^HR#k^@Z{wSFOpEkecWV39N_=Gl8JiyY_ zj}fqJcB?ap%^1Y|dU!>D3%s4`r{E6}=7NtsNieYnD!$HpckbTV_YLg&1}eecO7Ki2 zJXq=Ot@?pBSObctuD)Fjfl$}h&5fIzAFWPRl&)h@Q+jF=P`j&Kt45f1EXv9S5A(G8 zwtO@8_=LR!47cjX=Nax*LId{6bB2dF%sb=N`&4_Y-jJ)K)^M46~cf*||_&i*I% T3Kxz67q5eG|7PZHzzhB#)_G$X literal 0 HcmV?d00001 diff --git a/pythonProject1/TrialRecommend/__pycache__/Main.cpython-312.pyc b/pythonProject1/TrialRecommend/__pycache__/Main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e61384bc60be82f073da8709301adde30a34955f GIT binary patch literal 25670 zcmeHvYg8P^nP|_WnVuI6%m4$!Qy{?ziMO8C3kk`VY-8)?M8pn3^dNzFNIiok5b{+V zdxIP$f{h&@QKBJnuF#6acsDmDeyow#Io6(J_e{f}nRK+fx(Nd5Z0?CH+lO=Y8l=R^-h1|J!F*j^&#$V!`s(|>s_I{v%?1kG`lP*$-H%e#@9{-)+K}gy-+`x} zVkuVDLe+{-RjrD=t83Ndsj1b%Q{6(h#?{8DFpZ`~)2gf05x=U1sbwHc+oEqZ)EZii zwMG(7x0qVZwdU6N+W1hqgxUl(^(e*0y+pCP%W4sWT8k@@WsVe56t_Z6xwOss5{lvH z<&d}53MniuE2|$dNcmNi%i8P=rQp(6w=tr|sSW z^@m&s+fO*v0==^p{DO`=_8ox`V|Bf!evj)|hs*5|%r)(huP*f3Ak~ATiK^AGYJgf+1CVC50OMF1pbonMI!*^r&oTfFtRA3|H2^fRMu2A41Tda8 z159A!0b1AufQhUHU=o`M(8?wOw6Ruz$*c`v3TtPRUsBbkvMKOp?@V>33CxrAO>IY^ zc@3Hf#L?va94+V5z+0UBhH<*6 zHzw*$AN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pythonProject1/TrialRecommend/__pycache__/Notes_Request.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81ea7b470ea795f82bf31772bc5cf673530a796e GIT binary patch literal 3756 zcmaJ^TWk|o8Xn(oahxkA2>~Zf2@dgnJhr)Hfn*7R7FwW68)&WZoHO<~;~95moW#an z8FeY?ZlwgZOHwUTDblvt1+_d>U0SVH`@Sy;p<+5^wMa`+cuU*WO53MB<77yS=#K4k zzVn~|cIN;8bB_P+blNfW$TP?3yc5Izr4F>mumQdwLtqXA7|^lU*m|!U)1k4R)#nUj zhMaNCs9UF-#!QHAV9hzpm<7>{zsAO_&<0H7yD&_!=`m;p=Igq3%{r{8E9$(KN9ypn zSFhNI7)lxy7zqmN_#`9&6udgcc?gmPiJ=SZDZY@WHWbv;h8p<)4@6|3aZ=CchN+U(2LvgNTpTiKRv-kj4A*scWy>;PCh zRs6$$&0RLWgnxK@uI>%w`X|HJ+#GtJM9B z)H9&x#N_br%k^bfxdF6YF;|+)#%%82uw~+`llF@&+uGY%oO|- zp9{dLJj)9(P-=yMkup!tmo7?hN(yA89NSOk^DIM=62o(WDV4H&>Pc#j-TV6fpg+;i zXuWV0rj9XEAR3AJBZOzyu_LFSf3DxdGUL!Q45@M6>lw@ld=3Ue zVWdF)cutWtDKHx%UW;Nw`)h_rdv8%OAEYRlmrAbn-uE0@WdXgZQr#fWNsyC#r;B;0 zm`?~yn&A}7Nk~Hh3MKnXA{2ZF(}<(gLq@1L8IMMN5X7UtXpAO&i4YBa5f~&X2xuC> zxPph`bRtE>AO%txJd_fcFiQqOI$g*yoB(1VmlMYE{1hFF2GJ7^MWf-6;vqmH22&sc ziC{E@#}jDXFh&w283G}SP9&5g#aEc@(6LvF;3#o)9gl)j#7l$p&=g)AIvhC~3dRpJ zqxATAjEI~L$43s+qck3m$B!1n;iJX)=qq&aR53eLGUNUb;SVW0gLp7VBvKIqkAO%x z8jsR69ZNtMOGI!y1@Kfnk)jCYKsZW=6A6k!p5h4-;;}H9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K$*rUE)&aT2^KEOL%Um7)cROZrOz)jPy)b<1cM-iw)w8xy}3Is zu6p!=%RN(mt9;e4FnTL}$91@Re{MPq7-|Jj3FFOL&A-SPt&UwlCj;nf1uJ5f5 z->a*i8F_1DHa&lCxo&s$m$Ieq;<@wZWEhaMmq`z8B)_?`Od$bC!4 zy!3wYz2cH(*FCFqu^#`@8oiG=Y?o~Fy~_>VcN=<_8hWQqvb$rhc&T`G%T4oaaoHWa z>)yBI-Zxz*yFH6tp(S^Cx?XPHHh*@hxo_IOiS9SM=Mt9^^DiwBvx(*A@U-g$=f57^7ioT@V)MykNQ67TNu4LzTACi_SpTdoga06(78~#b#l4ufZWx; z@ZtyC<=%+g6PA1Y==-hH(za!GaIFDr-Ep_2cd4a!!EmRg|6WVmV!QuNOW>=PwzW=V ze9eQI%om5x4__Gh9%TSZ$z(D|GF&pLY$c*N8O1|TJzLcWp>P77qh7lZL#zU>@*7aG z)Jj@V{|yPj8Z9N_wUVx7ma02zOXj;}G>Ke3%(W3GQ-o!=P`=ydgKhxM4TZn|{a(Ds$Faj~iYOQUbifEn9sO8*Cp Ck|hNI literal 0 HcmV?d00001 diff --git a/pythonProject1/TrialRecommend/__pycache__/func_collec.cpython-312.pyc b/pythonProject1/TrialRecommend/__pycache__/func_collec.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12043684865c1058d952557edee518abf22db8b8 GIT binary patch literal 1844 zcmah|O>7fK6rTO_{@7k8Hjt30#56!`l|)VukU-TEl9W=Rw1Tt}Q7Yu@tci`i8)nya z9C@o$?IET?4hRWLRn;8mp$eBuRfVda3b$T>reZaurwR(Ex}*{kTsq@;Ys7_Tt=~8A zZ@!uL=GS0Q0YutcPNjl80DsbjCu{?3>>=PPfB-UCFuAFjNtUeHESKXac?Ll43ot1Z znK=KLCXL4#tmJgdN}koH%{k4hM14N;apc>$K&+%H1;Fu@gc5Tu1^^ODKIq#{VjZ?5KyjWTVJX4` znVyFHRvQc%U{ii|$w(e*>WsgM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o literal 0 HcmV?d00001 diff --git a/pythonProject1/TrialRecommend/data.csv b/pythonProject1/TrialRecommend/data.csv new file mode 100644 index 0000000..17a1ef2 --- /dev/null +++ b/pythonProject1/TrialRecommend/data.csv @@ -0,0 +1,10 @@ +649816f8000000001303d732,第一次去株洲买衣服 500元买了9件,5972,"['http://sns-webpic-qc.xhscdn.com/202405262335/10a80751f1f8f599e44b2d911a215b44/1000g0082n0s5vlojk000459240k8dgvg8pknqig!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/d07a643f315fa9d6731a123afc59ed18/1000g0082n0s5vlojk00g459240k8dgvg2q77008!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/0fa74130e4c8740a871379e72eb578f1/1000g0082n0s5vlojk010459240k8dgvgps7eb08!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/f8e5586ec8cd802ee3d5b37f827b33e3/1000g0082n0s5vlojk01g459240k8dgvgbm33rig!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/35e9a9ec61c898a0b0133b653dc5a370/1000g0082n0s5vlojk020459240k8dgvgtjg2ndg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b33d3a4e096fea298082d7a3d2b7dfd0/1000g0082n0s5vlojk02g459240k8dgvguio2lmo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/90210a78b871978113c37b0f2a83fd94/1000g0082n0s5vlojk030459240k8dgvgfkb7dkg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/97239eda30fa88230f4eae28a7ea162c/1000g0082n0s5vlojk03g459240k8dgvgi58hvf0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/bc32ada154d1a795798e17d6af6e0cab/1000g0082n0s5vlojk040459240k8dgvgqinob9g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a88a59cf6074143d53eacd5d5e621db5/1000g0082n0s5vlojk04g459240k8dgvgmabf1i8!nc_n_webp_mw_1']" +651d65bc000000001f0053aa,株洲敲适合city walk的一条街🍂好逛又好拍,5933,['http://sns-webpic-qc.xhscdn.com/202405262335/70694052ba78a3d03dc1044790d07dd3/1040g00830pqcsrro6q004a6p01vkmfuo2j12u3g!nc_n_webp_mw_1'] +6586f4110000000038015027,长沙周边游 | 株洲两日攻略(附详细景点介绍,2076,"['http://sns-webpic-qc.xhscdn.com/202405262335/395bb31308f002d95326ea701a535e10/1040g2sg30t1fh5u63u005p7lmaf18113ig1pqu8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b183e342c418b0a6a2b0570e02eb892d/1040g2sg30t1fh5u63u0g5p7lmaf18113bo892m0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b11cdf41ab6367749411d7a3d1abcbb4/1040g2sg30t1fh5u63u105p7lmaf181130s31f1g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5c53162ad9402aeddabca72657e56967/1040g2sg30t1fh5u63u1g5p7lmaf18113225kl4g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/e2cdc30025df9eb30baa44708d967c93/1040g2sg30t1fh5u63u205p7lmaf18113n35f1tg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b3011765ae37806b85364430fe4be7c8/1040g2sg30t1fh5u63u2g5p7lmaf18113clbr86o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/96b115f6fff94703e286037fa61318e7/1040g2sg30t1fh5u63u305p7lmaf18113k3ha4eo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c363fb23288406f0ee8ab9732b5afb98/1040g2sg30t1fh5u63u3g5p7lmaf18113v7otgeo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/651f3738f0b88d78f6cb937b9e3d0b61/1040g2sg30t1fh5u63u405p7lmaf18113sena380!nc_n_webp_mw_1']" +662884050000000003020521,株洲一日攻略丨特种兵女大Citywalk路线‼️,1778,"['http://sns-webpic-qc.xhscdn.com/202405262335/428a204b96f96669cc3f314adb7fb2a5/1040g2sg311v8bf9530005o7k5p908v0jkougld8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/1d50c2c65ae7108df2e18491a999be77/1040g2sg311v8bf95300g5o7k5p908v0js69da70!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/bb40b9a88902c506cfd4e500a9c1a24f/1040g2sg311v8bf9530105o7k5p908v0jge8dbc0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/335bdc09e2311717420f77eb320f41bc/1040g2sg311v8bf95301g5o7k5p908v0ji3ha00g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/2902f99fe4dadcaee2e417b0a07d3233/1040g2sg311v8bf9530205o7k5p908v0jlkbr0to!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/6157fc5d53ff4acf1bc24a18ad94cdb8/1040g2sg311v8bf95302g5o7k5p908v0jtdpm07o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c1ddee3eab5b7f22d3a4f417ab97f169/1040g2sg311v8bf9530305o7k5p908v0jln7i45g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5793d05adc527d50ce79df7f563f081f/1040g2sg311v8bf95303g5o7k5p908v0jhh2bn00!nc_n_webp_mw_1']" +657ffbb7000000000703920c,株洲也有自己的文艺巷子啦✨🐕🌸,1187,"['http://sns-webpic-qc.xhscdn.com/202405262335/18400596f57c263fad2b163d1dfc98d1/1040g2sg30sqlmci742004a7mjb6ciub7g76m89o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/9d82dd20d550686890bda86c559934f3/1040g2sg30sqlmci7420g4a7mjb6ciub7fngip78!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7c96d86a4a0f2141229fc35623635288/1040g2sg30sqlmci742104a7mjb6ciub7rh9iqo8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/2ff41d5b7135ad897ff3a9fb3b3c121a/1040g2sg30sqlmci7421g4a7mjb6ciub7baok04o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c3e76764c44c5bd13ac73b0ae3edff38/1040g2sg30sqlmci742204a7mjb6ciub79glsnqg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/f087c6d4e1df2a24df2e32494ab3a3f0/1040g2sg30sqlmci7422g4a7mjb6ciub7pkbuc3o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/85c4c4943386806e3a83a98fffae2c96/1040g2sg30sqlmci742304a7mjb6ciub7a3ps9ag!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5481ee0b8c16864214cc75484343050c/1040g2sg30sqlmci7423g4a7mjb6ciub7dpaqnso!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/3d8f6e626fb13db91263b7862ac5de39/1040g2sg30sqlmci742404a7mjb6ciub72sp2v08!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7a1333d66963425e5219fa31d4dfaef0/1040g2sg30sqlmci7424g4a7mjb6ciub7vmqm0q8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/6055f8ee87a15d8de91316ba23949ddb/1040g2sg30sqlmci742504a7mjb6ciub716m96m8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c4e35027c8f5f309d204d6afc0980bd8/1040g2sg30sqlmci7425g4a7mjb6ciub79gcr1qg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/bf220ad342583b09e70ad35d247f2fc0/1040g2sg30sqlmci742604a7mjb6ciub730jga5g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/feefad20bca85ca3582a1d1f027a5e4b/1040g2sg30sqlmci7426g4a7mjb6ciub7u9kac1g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/0777eca1460336c797a654635de3413a/1040g00830sqlmcknk2004a7mjb6ciub7gs08if8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5f8b6ef281dc95ca4dc675a1bded5de3/1040g00830sqlmcknk20g4a7mjb6ciub78nbr2n0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7ddbee0cbab7f7bccd7859b53d071f1d/1040g00830sqlmcknk2104a7mjb6ciub7r52a0jg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a524968bd853dfccd2425a699a35ba4a/1040g00830sqlmcknk21g4a7mjb6ciub7a82i9h0!nc_n_webp_mw_1']" +663465cb000000001e01af52,长沙到株洲买衣服攻略!!,958,"['http://sns-webpic-qc.xhscdn.com/202405262335/81e6773e4544131792ead7556f158599/1040g2sg312arlbq1lm005nhdo5mg8svbul2co58!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/864c295d9138ab6b669b964efbf1531e/1040g2sg312arlbq1lm0g5nhdo5mg8svb6e9s8c8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/1b73bc27c0626b95a76f5caa96386f4e/1040g2sg312arlbq1lm105nhdo5mg8svbft2e5ng!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/556d1240a6d77d135e30f347ca4830b5/1040g2sg312arlbq1lm1g5nhdo5mg8svb8fck3j0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/0af044295b4d21035ec850966b07590a/1040g2sg312arlbq1lm205nhdo5mg8svbr21qkoo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/68b6531f57fd77e6af621568eedae679/1040g2sg312arlbq1lm2g5nhdo5mg8svbubbhstg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/1dd55adcbd7154f36d159c2ee12fe709/1040g2sg312arlbq1lm305nhdo5mg8svb0k8flo0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5126bcd39da1d31014aaba1c7bbc3929/1040g2sg312arlbq1lm3g5nhdo5mg8svbhsc5os8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/58856c29f8062649a41709222cb549b5/1040g2sg312arlbq1lm405nhdo5mg8svb9c4tc1o!nc_n_webp_mw_1']" +64faf4c10000000013029aa8,来我家乡玩一天|株洲(摄影篇),670,"['http://sns-webpic-qc.xhscdn.com/202405262335/e8929a89182a36e2eeb14d08006f1e13/1040g00830ooojr0uja005ntf78ngbvt530c3310!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/4d02c4dcb10d8bfd99fba31f23e5b43d/1040g00830ooojr0uja0g5ntf78ngbvt56uu6hcg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/59c99c4fead9149ed9d0ef3b06f5317a/1040g00830ooojr0uja105ntf78ngbvt5756ingo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/6d471acd59a07edac817f5ee01bdc208/1040g00830ooojr0uja1g5ntf78ngbvt5qfn890g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/232537ce8da808a9bea6f5b98a4eee7c/1040g00830ooojr0uja205ntf78ngbvt55gqfj7o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/83650ea5dfeecc2dc7ce2f2ea583bf2e/1040g00830ooojr0uja2g5ntf78ngbvt5ms9peu8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b13db1e19a60eb3a7599e12395aa8d7b/1040g00830ooojr0uja305ntf78ngbvt5v5pquco!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/2203f9eadb2a9821a582402b222b2e25/1040g00830ooojr0uja3g5ntf78ngbvt5lpgpou0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/ca64f991606cee6066bc44407e5e6fcc/1040g00830ooojr0uja405ntf78ngbvt55u812m8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/1228c4bbf760f653bfda5917adb091f9/1040g00830ooojr0uja4g5ntf78ngbvt5404akq0!nc_n_webp_mw_1']" +66374d0c000000001e024a2a,第一次去株洲买衣服600拿下16件🧚‍♀️附地图,513,"['http://sns-webpic-qc.xhscdn.com/202405262335/b7564ebb55c666e4e7557301fa6df5a3/1040g2sg312dmcjpum6005nfj92b097favpltcp8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/205758db28533f36a48c47ea7c76fd82/1040g2sg312dmcjpum60g5nfj92b097fa845f1gg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c57dc6d35b76cce82b208fb4efde1684/1040g2sg312dmcjpum6105nfj92b097fa4unkd70!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7d5255dfb23ba6ef70e40c97367e01a6/1040g2sg312dmcjpum61g5nfj92b097fa555atug!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/af7a79fba1b14915d2f209730fbc1a1f/1040g2sg312dmcjpum6205nfj92b097faatf8q2o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7de547491e5e8eb28a6784110d359c85/1040g2sg312dmcjpum62g5nfj92b097fac4prjjg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/1f46f3066cee886d1ba921463d457dd6/1040g2sg312dmcjpum6305nfj92b097fafqm8dug!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/3aea8f5587c49a3b9f6d0c20fbbaee63/1040g2sg312dmcjpum63g5nfj92b097favom8ahg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/7eb4458e4154b10a30cb77257a75a9a5/1040g2sg312dmcjpum6405nfj92b097fabs5q1i0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/5020d42e5ad56ae5fe21aa9879ade1ac/1040g2sg312dmcjpum64g5nfj92b097faa8bh7p0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/37d5ef740c9292113e173b29b08c565f/1040g2sg312dmcjpum6505nfj92b097fagcduia8!nc_n_webp_mw_1']" +647f691f00000000110121e6,株洲小姐们文艺拍照的地方📷,498,"['http://sns-webpic-qc.xhscdn.com/202405262335/609876ecfccc8756f3dd9f85ad117422/1000g0082k0f7rjkj80005nmrc8tg8rthaajfmmo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/df0f93858aac36ad70ee0837cca59227/1000g0082k0f7rjkj800g5nmrc8tg8rthfs04768!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a14e90e055630e3bea2a599b2ee88cfb/1000g0082k0f7rjkj80105nmrc8tg8rtht1p9cd0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/f6ccead0fb17b8575cf90e9689edb139/1000g0082k0f7rjkj801g5nmrc8tg8rthoh4brdg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/238bc5da872c855ccb94f99f4caa4fcf/1000g0082k0f7rjkj80205nmrc8tg8rthrbjpchg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/41d9e10e2dfe1c253038df28db7916a5/1000g0082k0f7rjkj802g5nmrc8tg8rthbln7k18!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/b41f231dde02a999ebeba3ea8ace9132/1000g0082k0f7rjkj80305nmrc8tg8rth2etddso!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/896408cf1c814ee09d52b6f1eaf16916/1000g0082k0f7rjkj803g5nmrc8tg8rthbftroh8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a1336ced38c0ee2a916bd06efc42da17/1000g0082k0f7rjkj80405nmrc8tg8rthij37r6o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/0a371bae50798c5956bf9a77c0668ea8/1000g0082k0f7rjkj804g5nmrc8tg8rthqmu2o7o!nc_n_webp_mw_1']" +653a7af5000000002500a2e2,株洲两天一夜保姆级旅游攻略,请注意查收❗,493,"['http://sns-webpic-qc.xhscdn.com/202405262335/0edaa11e25899daccb1112c9acf17964/1040g00830qmpnb2o10605nvkaa6091r1j197o68!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/423f8b6740d5f4317ba317087a3734e2/1040g00830qmpnb2o10405nvkaa6091r1ic4vhl0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/da1a2d1d4f54743e93c52f6a67235705/1040g00830qmpnb2o103g5nvkaa6091r18ed2vug!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/3e5c8d7b1bfb3f88ad7fd129691308e9/1040g00830qmpnb2o10205nvkaa6091r1v9o9klo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/cb8fcd7ebb06e3d5cbdf0edc20302004/1040g00830qmpnb2o101g5nvkaa6091r1u7e856g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/f16e0b4b650be0631254da04811f38b6/1040g00830qmpnb2o104g5nvkaa6091r18150jfo!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/53e5ba25b9dad5f1368b709d27476038/1040g00830qmpnb2o10505nvkaa6091r1n4upf08!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a1269a90e4f535e88209e215b1f192e1/1040g00830qmpnb2o10305nvkaa6091r1ffueht0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a777fdd61546940b1616440fbe280852/1040g00830qmpnb2o100g5nvkaa6091r1tae63g8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/d0224a443e995fd76030bf6fa09c2fbb/1040g00830qmpnb2o106g5nvkaa6091r19cplhe0!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/c169cb4d892800829b31191043aaadff/1040g00830qmpnb2o10005nvkaa6091r1q8e1g6o!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/d37838d4645564a49f01f066406f11bb/1040g00830qmpnb2o10105nvkaa6091r1r37cuhg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/8abe46ef28a8ba561b3f85dbdd32b702/1040g00830qmpnb2o105g5nvkaa6091r1vjkuvn8!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/cd16ec3a97e2c70be4fe3db62c8be9ce/1040g00830qmpnb2o102g5nvkaa6091r11g87s2g!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/35d3e4f59d259a041a52c5ade6fd061a/1040g2sg30qmpnv66gmkg5nvkaa6091r14k29f68!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/55026cdcf743a2513ab9b1049a14c297/1040g2sg30qmpnv66gmk05nvkaa6091r13im21fg!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/a41fd5d54331928579b041a7b603feb1/1040g2sg30qmpnv66gmjg5nvkaa6091r1pod4628!nc_n_webp_mw_1', 'http://sns-webpic-qc.xhscdn.com/202405262335/8c6691637fe8edea15aa279c5825691f/1040g2sg30qmpnv66gmig5nvkaa6091r1ubm4q7g!nc_n_webp_mw_1']" diff --git a/pythonProject1/TrialRecommend/func_collec.py b/pythonProject1/TrialRecommend/func_collec.py new file mode 100644 index 0000000..d22f3e1 --- /dev/null +++ b/pythonProject1/TrialRecommend/func_collec.py @@ -0,0 +1,36 @@ +import csv +import mysql.connector +from tkinter import messagebox + +def collec(user,data_index): + id='' + with open('data.csv', 'r',encoding='utf-8', newline='') as file: + reader = csv.reader(file) + index=0 + for row in reader: + if index == data_index: + id=row[0] + index=index+1 + db = mysql.connector.connect( + host="localhost", + user="root", + passwd="A121023020309a", + database="trial" + ) + + sql='INSERT INTO trial.collections (user_id, essay_id) VALUES (%s, %s)' + cursor=db.cursor() + success='true' + try: + cursor.execute(sql, (user, id)) + db.commit() + except db.Error as e: + print(f"An error occurred: {e}") + db.rollback() + messagebox.showinfo("Error", "收藏失败!") + success='false' + finally: + # 确保cursor关闭,释放资源 + cursor.close() + if success == 'true': + messagebox.showinfo('提示','收藏成功!') \ No newline at end of file diff --git a/pythonProject1/TrialRecommend/notes.csv b/pythonProject1/TrialRecommend/notes.csv new file mode 100644 index 0000000..2c5257e --- /dev/null +++ b/pythonProject1/TrialRecommend/notes.csv @@ -0,0 +1,2 @@ +第一次去株洲买衣服 500元买了9件 ,📍进货地点:新天地、巨丰、意法三个商场
🛒进货战况:534元买了1双鞋、1条裤子、2条连衣裙、5件上衣,共计9件,平均不到60元!!!

1️⃣第一站:新天地 ⭐⭐⭐⭐
预算有限的学生党首选商场,价格意外美丽(基本不让砍价,最多砍个2-5元),T恤很多都是50元3件,连衣裙很少过百,反正就穿1个夏天,还在乎什么~~因为不让试穿,我都尽量选不带大印花、大logo等相对日常不会出错的基本款
新天地分为两层,负一层营业时间:早7:00-16:00,负二层营业时间:早4:00-12:00,大家要注意营业时间哦,去晚了很多店都关门了(主打一个佛系)

2️⃣第二站:巨丰 ⭐️⭐️⭐️⭐️⭐️
感觉巨丰的款式和质量比新天地好太多,价格没有那么白菜,但也很平价了!很适合年轻姐妹细逛,韩系/辣妹/Y2k等等风格都有,但也是不让试穿和不砍价(遇到好点的老板还是会象征性少一点),实在把握不准上身效果可以问老板看她手机里有模特图吗
价位:上衣50-70元不等,连衣服/套装裙:109-129元不等,裤子:70-89元不等

3️⃣第三站:意法 ⭐⭐⭐⭐
最大的优点就是可以试穿!年轻姐妹可以主逛负1楼-2楼,负1楼是包包、鞋子、饰品,1-2楼年轻女装,价格相对便宜,淘到一条质量超级棒的黑色长裙只要120元,也能砍价,时间够还是值得细逛的(5点就关门哦)
逛完这3个商场,我和姐妹累成废柴,但看到收获的美丽衣服,可快乐了!

,2023-06-25 ,4191,5972,3396 +株洲敲适合city walk的一条街🍂好逛又好拍 ,就在市中心!!
王府井对面,株百后面的巷子里
好多人不知道
定位📍文艺巷
这一条街全是好看又治愈的宝藏小店
,2023-10-04 ,2832,5933,3400 diff --git a/pythonProject1/URL.txt b/pythonProject1/URL.txt new file mode 100644 index 0000000..ca1a02a --- /dev/null +++ b/pythonProject1/URL.txt @@ -0,0 +1,5 @@ +阿里云 http://mirrors.aliyun.com/pypi/simple/ +中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ +豆瓣 http://pypi.douban.com/simple/ +清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ +中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/ \ No newline at end of file