|  | @@ -51,6 +51,7 @@ def get_adcreatives(account_id,access_token,flag,adc_ids,dt):  # 获取创意
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          while True:
 | 
	
		
			
				|  |  |              h = requests.get(url, params=parameters)
 | 
	
		
			
				|  |  | +            # print(h.json())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if h.status_code == 200:
 | 
	
		
			
				|  |  |                  r = h.json()
 | 
	
	
		
			
				|  | @@ -71,6 +72,7 @@ def get_adcreatives(account_id,access_token,flag,adc_ids,dt):  # 获取创意
 | 
	
		
			
				|  |  |                      if len(i['adcreative_elements'])>0:
 | 
	
		
			
				|  |  |                          d = i['adcreative_elements']
 | 
	
		
			
				|  |  |                          title =d.get('title','')
 | 
	
		
			
				|  |  | +                        description = d.get('description', '')
 | 
	
		
			
				|  |  |                          if 'image' in d.keys():
 | 
	
		
			
				|  |  |                              image=d.get('image','')
 | 
	
		
			
				|  |  |                          elif 'image_list' in d.keys():
 | 
	
	
		
			
				|  | @@ -86,7 +88,7 @@ def get_adcreatives(account_id,access_token,flag,adc_ids,dt):  # 获取创意
 | 
	
		
			
				|  |  |                          i['adcreative_id'],i['adcreative_name'],i['campaign_id'],image,title,
 | 
	
		
			
				|  |  |                          i.get('promoted_object_type',''),i.get('page_type',''),
 | 
	
		
			
				|  |  |                          i['page_spec'].get('page_id',''),i.get('promoted_object_id',''),
 | 
	
		
			
				|  |  | -                        '','','MP',account_id,dt
 | 
	
		
			
				|  |  | +                        '',description,'MP',account_id,dt
 | 
	
		
			
				|  |  |                      ))
 | 
	
		
			
				|  |  |                  else:
 | 
	
		
			
				|  |  |                      if len(i['adcreative_elements'])>0:
 | 
	
	
		
			
				|  | @@ -536,7 +538,7 @@ if __name__ == '__main__':
 | 
	
		
			
				|  |  |      get_ad_cost_day(account_id,access_token,'MP','2021-04-05','2021-04-05')
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +    get_adcreatives(account_id,access_token,'MP','3187867673','2021-04-09')
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 |