From 25087cbe79c8c4992551477d55d9db8bbea2202e Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期三, 30 七月 2025 22:14:39 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.114.84:7070/r/AutoMediaPublisher

---
 auto_media_publisher/uploaders/uploader_shipinhao.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/auto_media_publisher/uploaders/uploader_shipinhao.py b/auto_media_publisher/uploaders/uploader_shipinhao.py
index 57baa58..079cc87 100644
--- a/auto_media_publisher/uploaders/uploader_shipinhao.py
+++ b/auto_media_publisher/uploaders/uploader_shipinhao.py
@@ -15,7 +15,7 @@
 
         await page.click('input[placeholder="璇烽�夋嫨鍙戣〃鏃堕棿"]')
 
-        str_month = str(self.publish_datetime.month) if self.publish_datetime.month > 9 else "0" + str(self.publish_datetime.month)
+        str_month = str(self.scheduled_time.month) if self.scheduled_time.month > 9 else "0" + str(self.scheduled_time.month)
         current_month = str_month + "鏈�"
         # 鑾峰彇褰撳墠鐨勬湀浠�
         page_month = await page.inner_text('span.weui-desktop-picker__panel__label:has-text("鏈�")')
@@ -32,14 +32,14 @@
             if 'weui-desktop-picker__disabled' in await element.evaluate('el => el.className'):
                 continue
             text = await element.inner_text()
-            if text.strip() == str(self.publish_datetime.day):
+            if text.strip() == str(self.scheduled_time.day):
                 await element.click()
                 break
 
         # 杈撳叆灏忔椂閮ㄥ垎锛堝亣璁鹃�夋嫨11灏忔椂锛�
         await page.click('input[placeholder="璇烽�夋嫨鏃堕棿"]')
         await page.keyboard.press("Control+KeyA")
-        await page.keyboard.type(str(self.publish_datetime.hour))
+        await page.keyboard.type(str(self.scheduled_time.hour))
 
         # 閫夋嫨鏍囬鏍忥紙浠ゅ畾鏃舵椂闂寸敓鏁堬級
         await page.locator("div.input-editor").click()
@@ -49,7 +49,7 @@
         await page.locator('div.media-status-content div.tag-inner:has-text("鍒犻櫎")').click()
         await page.get_by_role('button', name="鍒犻櫎", exact=True).click()
         file_input = page.locator('input[type="file"]')
-        await file_input.set_input_files(self.path_video)
+        await file_input.set_input_files(self.path_media)
 
     async def add_short_title(self, page):
         short_title_element = page.get_by_text("鐭爣棰�", exact=True).locator("..").locator(
@@ -165,7 +165,7 @@
             self.logger.info(f'[+]姝e湪涓婁紶-------{self.title}.mp4')
             await page.wait_for_url(CONTENT_UPLOAD_URL, timeout=120000)
             file_input = page.locator('input[type="file"]')
-            await file_input.set_input_files(self.path_video)
+            await file_input.set_input_files(self.path_media)
             # 濉厖鏍囬鍜岃瘽棰�
             await self.add_title_tags(page)
             # 娣诲姞鍟嗗搧
@@ -176,7 +176,7 @@
             await self.add_original(page)
             # 妫�娴嬩笂浼犵姸鎬�
             await self.detect_upload_status(page)
-            if self.publish_datetime != 0:
+            if self.scheduled_time != 0:
                 await self.set_schedule_time_tencent(page)
             # 娣诲姞鐭爣棰�
             await self.add_short_title(page)
@@ -189,5 +189,5 @@
            
             return True
         except Exception as e:
-            self.logger.error(f"{self.user} upload video {self.path_video} fails, error is :{e}")
+            self.logger.error(f"{self.user} upload video {self.path_media} fails, error is :{e}")
             return False

--
Gitblit v1.9.1