瀏覽代碼

爱回收

PUGE 1 月之前
父節點
當前提交
5c0e8010c4
共有 3 個文件被更改,包括 302 次插入234 次删除
  1. 302 6
      爱回收.py
  2. 0 190
      米画师.py
  3. 0 38
      米画师.spec

+ 302 - 6
爱回收.py

@@ -8,12 +8,13 @@ import uuid
 import time
 import os
 import configparser
+import re
 
 class PhoneQueryApp:
     def __init__(self, root):
         self.root = root
         self.root.title("手机数据查询系统")
-        self.root.geometry("1300x850")
+        self.root.geometry("1300x920")  # 增加高度以容纳新控件
         
         # 配置文件
         self.config_file = "config.ini"
@@ -28,6 +29,15 @@ class PhoneQueryApp:
         self.current_keyword = ""
         self.current_sort = "sort_composite"  # 默认综合排序
         
+        # 自动检测相关变量
+        self.auto_detect_running = False
+        self.auto_detect_stop = False
+        self.auto_detect_page = 0
+        self.auto_detect_products = []
+        self.auto_detect_thread = None
+        self.auto_collect_count = 0
+        self.auto_check_count = 0
+        
         # 排序选项映射
         self.sort_map = {
             "综合排序": "sort_composite",
@@ -127,7 +137,7 @@ class PhoneQueryApp:
         self.root.columnconfigure(0, weight=1)
         self.root.rowconfigure(0, weight=1)
         main_frame.columnconfigure(0, weight=1)
-        main_frame.rowconfigure(5, weight=1)
+        main_frame.rowconfigure(6, weight=1)  # 调整行索引
         
         # Token设置区域
         token_frame = ttk.LabelFrame(main_frame, text="Token设置", padding="10")
@@ -232,9 +242,39 @@ class PhoneQueryApp:
             cb = ttk.Checkbutton(condition_frame, text=tag_name, variable=var)
             cb.grid(row=row, column=col, sticky=tk.W, padx=10, pady=3)
         
+        # ==================== 自动检测区域 ====================
+        auto_detect_frame = ttk.LabelFrame(main_frame, text="自动检测与收藏", padding="10")
+        auto_detect_frame.grid(row=4, column=0, sticky=(tk.W, tk.E), pady=(0, 10))
+        auto_detect_frame.columnconfigure(2, weight=1)
+        
+        # 循环次数阈值设置
+        ttk.Label(auto_detect_frame, text="循环次数少于:", font=("Arial", 10)).grid(row=0, column=0, sticky=tk.W, padx=(0, 5))
+        self.cycle_threshold_var = tk.StringVar(value="100")
+        self.cycle_threshold_entry = ttk.Entry(auto_detect_frame, textvariable=self.cycle_threshold_var, width=10)
+        self.cycle_threshold_entry.grid(row=0, column=1, sticky=tk.W, padx=(0, 10))
+        ttk.Label(auto_detect_frame, text="次", font=("Arial", 10)).grid(row=0, column=2, sticky=tk.W, padx=(0, 20))
+        
+        # 启动按钮
+        self.start_auto_btn = ttk.Button(auto_detect_frame, text="🚀 启动自动检测", command=self.start_auto_detect, width=18)
+        self.start_auto_btn.grid(row=0, column=3, padx=(0, 10))
+        
+        # 停止按钮
+        self.stop_auto_btn = ttk.Button(auto_detect_frame, text="⏹ 停止", command=self.stop_auto_detect, width=12, state="disabled")
+        self.stop_auto_btn.grid(row=0, column=4, padx=(0, 20))
+        
+        # 自动检测状态显示(使用Label而不是StringVar)
+        self.auto_status_label = ttk.Label(auto_detect_frame, text="自动检测未启动", font=("Arial", 9))
+        self.auto_status_label.grid(row=0, column=5, sticky=tk.W)
+        
+        # 统计信息
+        self.auto_stats_var = tk.StringVar()
+        self.auto_stats_var.set("检测: 0 | 收藏: 0")
+        stats_label = ttk.Label(auto_detect_frame, textvariable=self.auto_stats_var, font=("Arial", 9))
+        stats_label.grid(row=0, column=6, sticky=tk.W, padx=(20, 0))
+        
         # ==================== 结果显示区域 ====================
         result_frame = ttk.LabelFrame(main_frame, text="查询结果(可多选商品,点击批量收藏)", padding="10")
-        result_frame.grid(row=4, column=0, sticky=(tk.W, tk.E, tk.N, tk.S))
+        result_frame.grid(row=5, column=0, sticky=(tk.W, tk.E, tk.N, tk.S))
         result_frame.columnconfigure(0, weight=1)
         result_frame.rowconfigure(0, weight=1)
         
@@ -267,7 +307,7 @@ class PhoneQueryApp:
         
         # ==================== 底部按钮栏 ====================
         bottom_frame = ttk.Frame(main_frame)
-        bottom_frame.grid(row=5, column=0, sticky=(tk.W, tk.E), pady=(10, 5))
+        bottom_frame.grid(row=6, column=0, sticky=(tk.W, tk.E), pady=(10, 5))
         
         self.check_price_btn = ttk.Button(bottom_frame, text="获取循环次数", command=self.check_prices, width=18)
         self.check_price_btn.pack(side=tk.LEFT, padx=(0, 10))
@@ -281,7 +321,7 @@ class PhoneQueryApp:
         
         # ==================== 分页栏 ====================
         pagination_frame = ttk.Frame(main_frame)
-        pagination_frame.grid(row=6, column=0, sticky=(tk.W, tk.E), pady=(0, 5))
+        pagination_frame.grid(row=7, column=0, sticky=(tk.W, tk.E), pady=(0, 5))
         
         self.prev_btn = ttk.Button(pagination_frame, text="上一页", command=self.prev_page, width=10)
         self.prev_btn.pack(side=tk.LEFT, padx=(0, 10))
@@ -304,7 +344,7 @@ class PhoneQueryApp:
         
         # ==================== 状态栏 ====================
         status_frame = ttk.Frame(main_frame)
-        status_frame.grid(row=7, column=0, sticky=(tk.W, tk.E), pady=(5, 0))
+        status_frame.grid(row=8, column=0, sticky=(tk.W, tk.E), pady=(5, 0))
         
         self.status_var = tk.StringVar()
         self.status_var.set("就绪")
@@ -740,8 +780,264 @@ class PhoneQueryApp:
                     self.status_var.set(f"✗ 收藏失败: {msg}")
                     messagebox.showerror("收藏失败", f"收藏失败\n{product['info']['name']}\n错误: {msg}")
                 return
+                
+    # ==================== 自动检测功能 ====================
+    def start_auto_detect(self):
+        """启动自动检测"""
+        # 检查是否已启动
+        if self.auto_detect_running:
+            messagebox.showinfo("提示", "自动检测已在运行中")
+            return
+            
+        # 检查是否有搜索关键词
+        keyword = self.model_entry.get().strip()
+        if not keyword:
+            messagebox.showwarning("警告", "请先输入要搜索的机型")
+            return
+            
+        # 获取阈值
+        try:
+            threshold = int(self.cycle_threshold_var.get().strip())
+            if threshold < 0:
+                raise ValueError("阈值不能为负数")
+        except ValueError:
+            messagebox.showerror("错误", "请输入有效的循环次数阈值(正整数)")
+            return
+            
+        # 确认启动
+        result = messagebox.askyesno("确认启动", 
+                                   f"将自动检测所有符合条件的商品\n"
+                                   f"机型: {keyword}\n"
+                                   f"循环次数阈值: {threshold} 次\n\n"
+                                   f"检测到的商品将自动收藏,是否继续?")
+        if not result:
+            return
+            
+        # 重置状态
+        self.auto_detect_running = True
+        self.auto_detect_stop = False
+        self.auto_detect_page = 0
+        self.auto_detect_products = []
+        self.auto_collect_count = 0
+        self.auto_check_count = 0
+        
+        # 更新UI状态
+        self.start_auto_btn.config(state="disabled")
+        self.stop_auto_btn.config(state="normal")
+        self.auto_status_label.config(text="🔄 正在检测中...", foreground="blue")
+        self.auto_stats_var.set("检测: 0 | 收藏: 0")
+        
+        # 清空当前显示
+        for item in self.result_tree.get_children():
+            self.result_tree.delete(item)
+        self.current_products.clear()
+        
+        # 启动检测线程
+        self.auto_detect_thread = threading.Thread(target=self.auto_detect_loop, args=(keyword, threshold))
+        self.auto_detect_thread.daemon = True
+        self.auto_detect_thread.start()
+        
+    def stop_auto_detect(self):
+        """停止自动检测"""
+        if self.auto_detect_running:
+            self.auto_detect_stop = True
+            self.auto_status_label.config(text="⏹ 正在停止...", foreground="orange")
+            self.stop_auto_btn.config(state="disabled")
+            
+    def auto_detect_loop(self, keyword, threshold):
+        """自动检测循环"""
+        page = 0
+        total_collected = 0
+        total_checked = 0
+        
+        while not self.auto_detect_stop:
+            try:
+                # 搜索商品
+                self.root.after(0, lambda: self.auto_status_label.config(
+                    text=f"🔄 正在检测第 {page + 1} 页...", foreground="blue"))
+                
+                # 执行搜索
+                memory_ids = self.get_selected_memory()
+                battery_ids = self.get_selected_battery()
+                fineness_ids = self.get_selected_fineness()
+                condition_tags = self.get_selected_condition_tags()
+                
+                request_data = {
+                    "sortValue": "sort_composite",
+                    "scene": "search",
+                    "keyword": keyword,
+                    "sirReq": False,
+                    "cityId": 324,
+                    "pageIndex": page,
+                    "pageSize": self.page_size
+                }
+                
+                if memory_ids:
+                    request_data["gaeaSkuPpvIds"] = {"22": memory_ids}
+                if battery_ids:
+                    request_data["gaeaPricePpvIds"] = {"473": battery_ids}
+                if fineness_ids:
+                    request_data["gaeaFinenessIds"] = fineness_ids
+                if condition_tags:
+                    request_data["conditionTagList"] = condition_tags
+                    
+                url = "https://dubai-mp.aihuishou.com/ahs-yanxuan-service/products/search-goods-v2"
+                response = requests.post(url, json=request_data, headers=self.get_headers(), timeout=30)
+                result = response.json()
+                
+                if result.get('code') != 0:
+                    self.root.after(0, lambda: self.show_error(f"搜索失败: {result.get('resultMessage', '未知错误')}"))
+                    break
+                    
+                data = result.get('data', [])
+                total_count = result.get('totalCount', 0)
+                
+                # 计算总页数
+                if total_count > 0:
+                    total_pages = (total_count + self.page_size - 1) // self.page_size
+                else:
+                    total_pages = page + 1 if len(data) < self.page_size else page + 2
+                
+                # 如果没有数据,结束
+                if not data:
+                    self.root.after(0, lambda: self.auto_status_label.config(
+                        text="✅ 检测完成,没有更多商品", foreground="green"))
+                    break
+                    
+                # 处理当前页商品
+                page_collected = 0
+                for product in data:
+                    if self.auto_detect_stop:
+                        break
+                        
+                    total_checked += 1
+                    
+                    # 获取商品信息
+                    sale_goods_no = product.get('saleGoodsNo', '')
+                    product_no = product.get('productNo', '')
+                    name = product.get('name', '')
+                    
+                    # 获取循环次数
+                    cycle_count = self.get_cycle_count(sale_goods_no)
+                    
+                    # 解析循环次数为数字
+                    cycle_num = 0
+                    if cycle_count:
+                        try:
+                            # 尝试提取数字
+                            numbers = re.findall(r'\d+', cycle_count)
+                            if numbers:
+                                cycle_num = int(numbers[0])
+                        except:
+                            pass
+                    
+                    # 判断是否满足条件
+                    if cycle_num > 0 and cycle_num <= threshold:
+                        # 满足条件,收藏
+                        item_no = product_no or sale_goods_no
+                        success, msg = self.add_to_collection(item_no)
+                        
+                        if success:
+                            total_collected += 1
+                            page_collected += 1
+                            # 在列表中显示
+                            self.root.after(0, lambda p=product, c=cycle_count: self.display_auto_collected(p, c))
+                        else:
+                            # 收藏失败,记录日志
+                            print(f"自动收藏失败: {name} - {msg}")
+                            
+                    # 更新统计
+                    self.root.after(0, lambda tc=total_checked, tl=total_collected: 
+                                  self.auto_stats_var.set(f"检测: {tc} | 收藏: {tl}"))
+                    
+                    # 延时避免请求过快
+                    time.sleep(0.2)
+                    
+                # 更新页面信息
+                self.root.after(0, lambda p=page+1, pc=page_collected, tc=total_checked, tl=total_collected:
+                              self.auto_status_label.config(
+                                  text=f"🔄 第 {p} 页完成,本页收藏 {pc} 个", foreground="blue"))
+                
+                # 检查是否到达最后一页
+                if page >= total_pages - 1 or len(data) < self.page_size:
+                    self.root.after(0, lambda: self.auto_status_label.config(
+                        text="✅ 检测完成!已检测所有页面", foreground="green"))
+                    break
+                    
+                page += 1
+                
+                # 检查是否被停止
+                if self.auto_detect_stop:
+                    break
+                    
+                # 页面间延时
+                time.sleep(0.5)
+                
+            except Exception as e:
+                self.root.after(0, lambda: self.show_error(f"自动检测出错: {e}"))
+                break
+                
+        # 完成或停止
+        self.root.after(0, self.finish_auto_detect, total_checked, total_collected)
+        
+    def display_auto_collected(self, product, cycle_count):
+        """显示自动收藏的商品(高亮标记)"""
+        info = self.parse_product_info(product)
+        item_id = self.result_tree.insert("", tk.END, values=(
+            info['name'], 
+            f"¥{info['price']}", 
+            info['battery_efficiency'],
+            cycle_count,
+            info['fineness'], 
+            info['memory'], 
+            info['color'], 
+            info['network']
+        ))
+        
+        # 标记为已收藏(绿色背景)
+        self.result_tree.tag_configure('collected', background='#90EE90')
+        self.result_tree.item(item_id, tags=('collected',))
+        
+        # 保存到当前商品列表
+        self.current_products.append({
+            'item_id': item_id,
+            'saleGoodsNo': info['saleGoodsNo'],
+            'productNo': info['productNo'],
+            'info': info
+        })
+        
+    def finish_auto_detect(self, total_checked, total_collected):
+        """完成自动检测"""
+        self.auto_detect_running = False
+        self.start_auto_btn.config(state="normal")
+        self.stop_auto_btn.config(state="disabled")
+        
+        if self.auto_detect_stop:
+            self.auto_status_label.config(
+                text=f"⏹ 已停止 - 检测: {total_checked} | 收藏: {total_collected}", 
+                foreground="orange")
+        else:
+            self.auto_status_label.config(
+                text=f"✅ 完成 - 检测: {total_checked} | 收藏: {total_collected}", 
+                foreground="green")
+            
+        self.auto_stats_var.set(f"检测: {total_checked} | 收藏: {total_collected}")
+        
+        # 显示完成消息
+        if total_collected > 0:
+            messagebox.showinfo("自动检测完成", 
+                              f"检测完成!\n\n"
+                              f"共检测商品: {total_checked} 个\n"
+                              f"成功收藏: {total_collected} 个")
+        else:
+            if not self.auto_detect_stop:
+                messagebox.showinfo("自动检测完成", 
+                                  f"检测完成!\n\n"
+                                  f"共检测商品: {total_checked} 个\n"
+                                  f"没有找到符合条件的商品")
         
     def show_error(self, error_msg):
+        """显示错误信息"""
         self.search_btn.config(state="normal")
         self.jump_btn.config(state="normal")
         self.status_var.set(f"查询失败: {error_msg}")

+ 0 - 190
米画师.py

@@ -1,190 +0,0 @@
-import tkinter as tk
-from tkinter import scrolledtext, messagebox
-import requests
-import threading
-import time
-import json
-
-class PurchaseApp:
-    def __init__(self, root):
-        self.root = root
-        self.root.title("米画师商品购买工具")
-        self.root.geometry("600x500")
-        
-        self.running = False
-        self.stop_flag = False
-        
-        self.setup_ui()
-        
-    def setup_ui(self):
-        # 密码输入框
-        tk.Label(self.root, text="支付密码:").pack(pady=5)
-        self.password_entry = tk.Entry(self.root, show="*", width=50)
-        self.password_entry.pack(pady=5)
-        
-        # 商品ID输入框
-        tk.Label(self.root, text="商品ID:").pack(pady=5)
-        self.product_id_entry = tk.Entry(self.root, width=50)
-        self.product_id_entry.pack(pady=5)
-        
-        # 按钮框架
-        button_frame = tk.Frame(self.root)
-        button_frame.pack(pady=20)
-        
-        self.start_button = tk.Button(button_frame, text="启动", command=self.start_request, 
-                                     bg="green", fg="white", width=10)
-        self.start_button.pack(side=tk.LEFT, padx=10)
-        
-        self.stop_button = tk.Button(button_frame, text="停止", command=self.stop_request, 
-                                    bg="red", fg="white", width=10, state=tk.DISABLED)
-        self.stop_button.pack(side=tk.LEFT, padx=10)
-        
-        # 日志框架
-        tk.Label(self.root, text="请求日志:").pack(pady=5)
-        self.log_text = scrolledtext.ScrolledText(self.root, width=70, height=20, 
-                                                   wrap=tk.WORD)
-        self.log_text.pack(pady=5, padx=10, fill=tk.BOTH, expand=True)
-        
-    def log_message(self, message, is_error=False):
-        """在日志框中添加消息"""
-        timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
-        tag = "ERROR" if is_error else "INFO"
-        log_entry = f"[{timestamp}] [{tag}] {message}\n"
-        
-        self.log_text.insert(tk.END, log_entry)
-        self.log_text.see(tk.END)
-        
-        # 如果是错误消息,用红色显示
-        if is_error:
-            start_idx = self.log_text.index(f"end-{len(log_entry)}c")
-            end_idx = self.log_text.index("end-1c")
-            self.log_text.tag_add("error", start_idx, end_idx)
-            self.log_text.tag_config("error", foreground="red")
-    
-    def make_request(self, product_id, pay_password):
-        """执行单次请求"""
-        url = f"https://www.mihuashi.com/api/v1/manufactures/{product_id}/purchase"
-        
-        # 构建请求数据
-        payload = f"pay_password={pay_password}&remember_token=xxrohSwRvhkMzftVNTb2SQ&specification_ids%5B%5D=3931"
-        
-        headers = {
-            "content-type": "application/x-www-form-urlencoded",
-            "baggage": "sentry-environment=production,sentry-public_key=afa52c0802b4441ba513fb25cb6bc20a,sentry-release=com.mihuashi.iOS%408.8.1%2B245,sentry-trace_id=c576b096547343d790462dbe3600ce7e",
-            "x-track-trans-data": "CiQ4N2Q4NTRmOS02ZTQ4LTQ3YmMtOGIwYy1mMzRhY2U2Yzg4YTUSFQoMaG90XzE2NzY0X3YyFQDAr0QYHRISCggxNjc3OF92MhVgU9G+GNcBGhAKCTE1NzU4OmN0ch0A0l09GhAKCTE1NzU4OmN2ch0AyLg5IgAq1wIhC3L415YlBiR6vAJ7ImFwaV9yZXFfdGltZSI6MTc4MTI1MDQ2NCwic3BtXzMiOiLmjqjojZAiLCJzcG1fMiI6Iuapseeqly3mnI3orr4m5rC05Y2wIiwicGFnZV9udW0iOjEsImFiX3ZlcnNpb24iOiIiLCJzcG0iOiLnsbPnlLvluIgkIyMk5qmx56qXLeacjeiuvibmsLTljbAkIyMk5o6o6I2QIiwiY2xvc2VfcGVyc29uYWxpemVkX3JlYyI6ZmFsc2UsImJodl90aW1lIjoiMTc4MTI1MDQ2NCIsImJodl90aW1lX2hvdXIiOiIxNSIsImJodl90aW1lX21vbnRoZGF5IjoiMTIiLCJiaHZfdGltZV93ZWVrZGF5IjoiNSIsImZha2VfY29udGV4dF9pZCI6ImZha2VfY29udGV4dF9pZCJ9sAEOygEGNzY3NDY00AEy",
-            "sensor-id": "96F047C1-773B-4596-BA8F-EB8E3D08D404",
-            "authorization": "Bearer xxrohSdEFqQSt0fNY1mh4k",
-            "x-track-volc-extra": '{"recall_list":"hot_16764_v2,16778_v2","doc_type":"manufacture","status":"1","tags":"","score":"0.00001649724435992539"}',
-            "accept": "*/*",
-            "priority": "u=3, i",
-            "x-track-spm": "%E7%B1%B3%E7%94%BB%E5%B8%88$%23%23$%E6%9C%8D%E8%AE%BE&%E6%B0%B4%E5%8D%B0$%23%23$%E8%AF%A6%E6%83%85%E9%A1%B5$%23%23$12",
-            "accept-language": "zh-Hans-AU;q=1, en-AU;q=0.9",
-            "sentry-trace": "a0ac9f45d3f74b51b387a345b0d95389-2b3cdabdb84741e4-0",
-            "x-network-type": "wifi",
-            "user-agent": "MHSIPhoneApp/8.7.1 (iPhone; iOS 26.5; Scale/3.00; iPhone15,4)",
-            "cookie": "aliyungf_tc=5db016b76e04464209e124368fc4945f6be91f55436d0e145e708503abaa3602",
-            "Accept-Encoding": "gzip, deflate, br",
-            "Connection": "keep-alive"
-        }
-        
-        try:
-            response = requests.request("POST", url, data=payload, headers=headers, timeout=10)
-            
-            # 尝试解析JSON响应
-            try:
-                response_json = response.json()
-                formatted_response = json.dumps(response_json, ensure_ascii=False, indent=2)
-            except:
-                formatted_response = response.text
-            
-            self.log_message(f"请求URL: {url}")
-            self.log_message(f"响应状态码: {response.status_code}")
-            self.log_message(f"响应内容: {formatted_response[:500]}")  # 限制显示长度
-            
-            if response.status_code == 200:
-                self.log_message("请求成功")
-            else:
-                self.log_message(f"请求失败,状态码: {response.status_code}", is_error=True)
-                
-        except requests.exceptions.Timeout:
-            self.log_message("请求超时", is_error=True)
-        except requests.exceptions.ConnectionError:
-            self.log_message("连接错误,请检查网络", is_error=True)
-        except Exception as e:
-            self.log_message(f"请求异常: {str(e)}", is_error=True)
-    
-    def request_loop(self):
-        """请求循环,每2秒执行一次"""
-        product_id = self.product_id_entry.get().strip()
-        pay_password = self.password_entry.get()
-        
-        # 验证输入
-        if not product_id:
-            self.log_message("请输入商品ID", is_error=True)
-            self.stop_request()
-            return
-        
-        if not pay_password:
-            self.log_message("请输入支付密码", is_error=True)
-            self.stop_request()
-            return
-        
-        # 验证商品ID是否为数字
-        try:
-            int(product_id)
-        except ValueError:
-            self.log_message("商品ID必须是数字", is_error=True)
-            self.stop_request()
-            return
-        
-        self.log_message(f"开始请求循环,商品ID: {product_id}")
-        
-        while self.running and not self.stop_flag:
-            self.make_request(product_id, pay_password)
-            
-            # 等待2秒,但每秒检查一次停止标志
-            for _ in range(2):
-                if not self.running or self.stop_flag:
-                    break
-                time.sleep(1)
-        
-        self.log_message("请求循环已停止")
-    
-    def start_request(self):
-        """启动请求线程"""
-        # 验证输入
-        if not self.password_entry.get():
-            messagebox.showwarning("警告", "请输入支付密码")
-            return
-        
-        if not self.product_id_entry.get():
-            messagebox.showwarning("警告", "请输入商品ID")
-            return
-        
-        self.running = True
-        self.stop_flag = False
-        
-        # 更新按钮状态
-        self.start_button.config(state=tk.DISABLED)
-        self.stop_button.config(state=tk.NORMAL)
-        
-        # 启动请求线程
-        self.request_thread = threading.Thread(target=self.request_loop, daemon=True)
-        self.request_thread.start()
-    
-    def stop_request(self):
-        """停止请求"""
-        self.running = False
-        self.stop_flag = True
-        
-        # 更新按钮状态
-        self.start_button.config(state=tk.NORMAL)
-        self.stop_button.config(state=tk.DISABLED)
-
-def main():
-    root = tk.Tk()
-    app = PurchaseApp(root)
-    root.mainloop()
-
-if __name__ == "__main__":
-    main()

+ 0 - 38
米画师.spec

@@ -1,38 +0,0 @@
-# -*- mode: python ; coding: utf-8 -*-
-
-
-a = Analysis(
-    ['米画师.py'],
-    pathex=[],
-    binaries=[],
-    datas=[],
-    hiddenimports=[],
-    hookspath=[],
-    hooksconfig={},
-    runtime_hooks=[],
-    excludes=[],
-    noarchive=False,
-    optimize=0,
-)
-pyz = PYZ(a.pure)
-
-exe = EXE(
-    pyz,
-    a.scripts,
-    a.binaries,
-    a.datas,
-    [],
-    name='米画师',
-    debug=False,
-    bootloader_ignore_signals=False,
-    strip=False,
-    upx=True,
-    upx_exclude=[],
-    runtime_tmpdir=None,
-    console=False,
-    disable_windowed_traceback=False,
-    argv_emulation=False,
-    target_arch=None,
-    codesign_identity=None,
-    entitlements_file=None,
-)