|  | @@ -8,7 +8,6 @@ import pymysql
 | 
	
		
			
				|  |  |  import logging
 | 
	
		
			
				|  |  |  from concurrent.futures import ThreadPoolExecutor
 | 
	
		
			
				|  |  |  from model.DataBaseUtils import MysqlUtils
 | 
	
		
			
				|  |  | -# logging.getLogger().setLevel(logging.WARNING)
 | 
	
		
			
				|  |  |  from model.ComUtils import *
 | 
	
		
			
				|  |  |  from model.DateUtils import DateUtils
 | 
	
		
			
				|  |  |  du = DateUtils()
 | 
	
	
		
			
				|  | @@ -73,7 +72,7 @@ def get_campaign(account_id, access_token, flag,campaign_ids,dt):
 | 
	
		
			
				|  |  |      # logging.info(li)
 | 
	
		
			
				|  |  |      """mp 没有 speed_mode,is_deleted,budget_reach_date"""
 | 
	
		
			
				|  |  |      if li.__len__() > 0:
 | 
	
		
			
				|  |  | -        logging.info(f"{account_id}有计划:", li.__len__())
 | 
	
		
			
				|  |  | +        logging.info(f"{account_id}有计划:"+ str(li.__len__()))
 | 
	
		
			
				|  |  |          sql = "replace into campaign_info values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
 | 
	
		
			
				|  |  |          db.quchen_text.executeMany(sql, li)
 | 
	
		
			
				|  |  |      db.close()
 | 
	
	
		
			
				|  | @@ -195,7 +194,7 @@ def get_adcreatives(account_id,access_token,flag,adc_ids,dt):  # 获取创意
 | 
	
		
			
				|  |  |          else:
 | 
	
		
			
				|  |  |              break
 | 
	
		
			
				|  |  |      if len(li)>0:
 | 
	
		
			
				|  |  | -        logging.info(f"{account_id}有创意:",len(li))
 | 
	
		
			
				|  |  | +        logging.info(f"{account_id}有创意:"+str(len(li)))
 | 
	
		
			
				|  |  |          sql='replace into adcreative_info values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) '
 | 
	
		
			
				|  |  |          db.quchen_text.executeMany(sql,li)
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -261,7 +260,7 @@ def images_info_get(account_id,access_token,image_ids):  # 获取图片信息
 | 
	
		
			
				|  |  |      for i in li:
 | 
	
		
			
				|  |  |          data.append((i['image_id'],i['width'],i['height'],i['signature'],i['preview_url']))
 | 
	
		
			
				|  |  |      # logging.info(data)
 | 
	
		
			
				|  |  | -    logging.info(f"{account_id} 有图片:", li.__len__())
 | 
	
		
			
				|  |  | +    logging.info(f"{account_id} 有图片:"+str(li.__len__()))
 | 
	
		
			
				|  |  |      if li.__len__() > 0:
 | 
	
		
			
				|  |  |          sql="replace into image_info value (%s,%s,%s,%s,%s)"
 | 
	
		
			
				|  |  |          db.quchen_text.executeMany(sql, data)
 | 
	
	
		
			
				|  | @@ -328,7 +327,7 @@ def video_info_get(account_id,access_token,image_ids):  # 获取视频信息
 | 
	
		
			
				|  |  |      for i in li:
 | 
	
		
			
				|  |  |          data.append((i['video_id'],i['width'],i['height'],i['signature'],i['preview_url']))
 | 
	
		
			
				|  |  |      # logging.info(data)
 | 
	
		
			
				|  |  | -    logging.info(f"{account_id} 有视频:", li.__len__())
 | 
	
		
			
				|  |  | +    logging.info(f"{account_id} 有视频:"+ str(li.__len__()))
 | 
	
		
			
				|  |  |      if li.__len__() > 0:
 | 
	
		
			
				|  |  |          sql="replace into video_info value (%s,%s,%s,%s,%s)"
 | 
	
		
			
				|  |  |          db.quchen_text.executeMany(sql, data)
 | 
	
	
		
			
				|  | @@ -414,7 +413,7 @@ def get_ad_info(account_id, access_token, flag,ad_ids,dt):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      if li.__len__()>0:
 | 
	
		
			
				|  |  | -        logging.info(f"{account_id}有广告:",li.__len__())
 | 
	
		
			
				|  |  | +        logging.info(f"{account_id}有广告:"+str(li.__len__()))
 | 
	
		
			
				|  |  |          sql = "replace into ad_info values(%s,%s,%s,%s,%s,%s,%s,%s) "
 | 
	
		
			
				|  |  |          db.quchen_text.executeMany(sql, li)
 | 
	
		
			
				|  |  |      db.close()
 | 
	
	
		
			
				|  | @@ -652,7 +651,7 @@ def mysql_insert_adcreative(data):
 | 
	
		
			
				|  |  |          cursor.executemany(sql, data)
 | 
	
		
			
				|  |  |          db.commit()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        logging.info('insert [adcreative] ', len(data))
 | 
	
		
			
				|  |  | +        logging.info('insert [adcreative] '+ str(len(data)))
 | 
	
		
			
				|  |  |      except:
 | 
	
		
			
				|  |  |          db.rollback()
 | 
	
		
			
				|  |  |          logging.info('insert [adcreative] defeat')
 |