|
@@ -263,6 +263,20 @@ def get_daily_tt(st, et):
|
|
logging.info('get_tt_order:' + str(len(li)) + 'cost:' + str(int(time.time() - time1)))
|
|
logging.info('get_tt_order:' + str(len(li)) + 'cost:' + str(int(time.time() - time1)))
|
|
mysql_insert_daily_tt(li)
|
|
mysql_insert_daily_tt(li)
|
|
|
|
|
|
|
|
+def get_token_bytedance():
|
|
|
|
+ #添加bytedance账号,需要添加一下access_token
|
|
|
|
+ open_api_url_prefix = "https://ad.oceanengine.com/open_api/"
|
|
|
|
+ uri = "oauth2/access_token/"
|
|
|
|
+ url = open_api_url_prefix + uri
|
|
|
|
+ data = {
|
|
|
|
+ "app_id": 1709866698360883,
|
|
|
|
+ "secret": "****",
|
|
|
|
+ "grant_type": "auth_code",
|
|
|
|
+ "auth_code": "********"
|
|
|
|
+ }
|
|
|
|
+ rsp = requests.post(url, json=data)
|
|
|
|
+ rsp_data = rsp.json()
|
|
|
|
+ return rsp_data['data']['access_token']
|
|
|
|
|
|
def run(st, et):
|
|
def run(st, et):
|
|
logging.info('微信消耗数据拉取,开始')
|
|
logging.info('微信消耗数据拉取,开始')
|