|  | @@ -1,6 +1,7 @@
 | 
											
												
													
														|  |  """
 |  |  """
 | 
											
												
													
														|  |  @author: luojunhui
 |  |  @author: luojunhui
 | 
											
												
													
														|  |  """
 |  |  """
 | 
											
												
													
														|  | 
 |  | +import json
 | 
											
												
													
														|  |  import time
 |  |  import time
 | 
											
												
													
														|  |  import schedule
 |  |  import schedule
 | 
											
												
													
														|  |  from tqdm import tqdm
 |  |  from tqdm import tqdm
 | 
											
										
											
												
													
														|  | @@ -38,6 +39,7 @@ class UpdateAccountInfoVersion3(object):
 | 
											
												
													
														|  |                  D[account_name][dt] = fans
 |  |                  D[account_name][dt] = fans
 | 
											
												
													
														|  |              else:
 |  |              else:
 | 
											
												
													
														|  |                  D[account_name] = {dt: fans}
 |  |                  D[account_name] = {dt: fans}
 | 
											
												
													
														|  | 
 |  | +        print(json.dumps(D, ensure_ascii=False, indent=4))
 | 
											
												
													
														|  |          return D
 |  |          return D
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @classmethod
 |  |      @classmethod
 | 
											
										
											
												
													
														|  | @@ -70,7 +72,7 @@ class UpdateAccountInfoVersion3(object):
 | 
											
												
													
														|  |              temp[4] = fans_dict.get(temp[3], {}).get(dt, 0)
 |  |              temp[4] = fans_dict.get(temp[3], {}).get(dt, 0)
 | 
											
												
													
														|  |              temp[-1] = rate_dict.get(temp[3], {}).get(temp[1], 0)
 |  |              temp[-1] = rate_dict.get(temp[3], {}).get(temp[1], 0)
 | 
											
												
													
														|  |              temp[5] = fans_dict.get(temp[3], {}).get(dt, 0) * rate_dict.get(temp[3], {}).get(temp[1], 0)
 |  |              temp[5] = fans_dict.get(temp[3], {}).get(dt, 0) * rate_dict.get(temp[3], {}).get(temp[1], 0)
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +            print(temp)
 | 
											
												
													
														|  |              usql = f"""
 |  |              usql = f"""
 | 
											
												
													
														|  |              INSERT INTO account_avg_info_v3
 |  |              INSERT INTO account_avg_info_v3
 | 
											
												
													
														|  |              (gh_id, position, update_time, account_name, fans, read_avg, like_avg, status, account_type, account_mode, account_source, account_status, business_type, read_rate_avg)
 |  |              (gh_id, position, update_time, account_name, fans, read_avg, like_avg, status, account_type, account_mode, account_source, account_status, business_type, read_rate_avg)
 | 
											
										
											
												
													
														|  | @@ -113,6 +115,7 @@ def updateDaily():
 | 
											
												
													
														|  |      fd = Up.getAccountFans()
 |  |      fd = Up.getAccountFans()
 | 
											
												
													
														|  |      rd = Up.getAccountRate()
 |  |      rd = Up.getAccountRate()
 | 
											
												
													
														|  |      today_dt = datetime.today().__str__().split(" ")[0]
 |  |      today_dt = datetime.today().__str__().split(" ")[0]
 | 
											
												
													
														|  | 
 |  | +    today_dt = '2024-09-12'
 | 
											
												
													
														|  |      Up.reverseSingleDay(today_dt, fd, rd)
 |  |      Up.reverseSingleDay(today_dt, fd, rd)
 | 
											
												
													
														|  |      Up.lam.close()
 |  |      Up.lam.close()
 | 
											
												
													
														|  |      Up.pq.close()
 |  |      Up.pq.close()
 |