| 
														
															@@ -7,6 +7,7 @@ from datetime import timedelta 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import requests 
														 | 
														
														 | 
														
															 import requests 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import urllib3 
														 | 
														
														 | 
														
															 import urllib3 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+from main.common import Common 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 from main.feishu_lib import Feishu 
														 | 
														
														 | 
														
															 from main.feishu_lib import Feishu 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 proxies = {"http": None, "https": None} 
														 | 
														
														 | 
														
															 proxies = {"http": None, "https": None} 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -104,10 +105,30 @@ class Demo: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # 微信号 
														 | 
														
														 | 
														
															     # 微信号 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @classmethod 
														 | 
														
														 | 
														
															     @classmethod 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def get_sheet(cls): 
														 | 
														
														 | 
														
															     def get_sheet(cls): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        hour_sheet = Feishu.get_values_batch("hour", "xiaoniangao", "ba0da4") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        # print(hour_sheet) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        hour_sheet = Feishu.get_values_batch("hour", "xiaoniangao", "FEcuil") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        print(hour_sheet) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         print(hour_sheet[7][7]) 
														 | 
														
														 | 
														
															         print(hour_sheet[7][7]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @classmethod 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    def check_date(cls): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        date = Feishu.get_values_batch("hour", "xiaoniangao", "FEcuil") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        print(f'文档中L1:N1的日期:{date[0][11]}') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        today = datetime.datetime.now().strftime("%Y-%m-%d") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        print(f"today:{today}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Common.logger("hour").info("检查今日上升榜日期是否存在") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if date[0][11] != today: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            # 插入3列 L1:N1,并写入日期和时间数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            values = [[today], ["10:00", "15:00", "20:00"]] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            time.sleep(1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Feishu.insert_columns("hour", "xiaoniangao", "FEcuil", "COLUMNS", 11, 14) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            time.sleep(1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Feishu.update_values("hour", "xiaoniangao", "FEcuil", "L1:N2", values) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            time.sleep(1) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Feishu.merge_cells("hour", "xiaoniangao", "FEcuil", "L1:N1") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Common.logger("hour").info("插入今天日期成功") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        else: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Common.logger("hour").info("今日上升榜日期已存在") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 if __name__ == "__main__": 
														 | 
														
														 | 
														
															 if __name__ == "__main__": 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     demo = Demo() 
														 | 
														
														 | 
														
															     demo = Demo() 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -120,4 +141,5 @@ if __name__ == "__main__": 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # demo.times() 
														 | 
														
														 | 
														
															     # demo.times() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # demo.video_detail_info("44615236", "460972177", "62a9965e000001609aa588ad") 
														 | 
														
														 | 
														
															     # demo.video_detail_info("44615236", "460972177", "62a9965e000001609aa588ad") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    demo.get_sheet() 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    # demo.get_sheet() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    demo.check_date() 
														 |