| 
					
				 | 
			
			
				@@ -7,6 +7,7 @@ import urllib3 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 from requests.adapters import HTTPAdapter 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 from common import Material, Common, Feishu 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 from common.sql_help import sqlCollect 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+from data_channel.data_help import dataHelp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 from data_channel.douyin_help import DouYinHelper 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -55,7 +56,7 @@ class DY: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if data == [] and len(data) == 0: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if not data[0].get('search_impr').get('entity_type'): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Feishu.bot(mark, '机器自动改造消息通知', f'今日任务为空,请关注', name) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Feishu.bot(mark, '机器自动改造消息通知', f'抖音cookie过期,请及时更换', name) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 time.sleep(900) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 continue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.close() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -69,10 +70,12 @@ class DY: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         video_uri = data[i].get('video', {}).get('play_addr', {}).get('uri') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         ratio = f'{data[i].get("video", {}).get("height")}p' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         video_url = f'https://www.iesdouyin.com/aweme/v1/play/?video_id={video_uri}&ratio={ratio}&line=0'  # 视频链接 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        cover_url = data[i].get('video').get('cover').get('url_list')[0]  # 视频封面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        all_data = {"video_id": video_id, "cover": cover_url, "video_url": video_url} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        list.append(all_data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if len(list) == int(number): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            Common.logger("log").info(f"获取抖音视频总数:{len(list)}\n") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            return list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        duration = dataHelp.video_duration(video_url) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if int(duration) >= 45: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            cover_url = data[i].get('video').get('cover').get('url_list')[0]  # 视频封面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            all_data = {"video_id": video_id, "cover": cover_url, "video_url": video_url} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            list.append(all_data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if len(list) == int(number): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                Common.logger("log").info(f"获取抖音视频总数:{len(list)}\n") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                return list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return list 
			 |