修复 jump_param 参数处理
This commit is contained in:
parent
e0fc80df03
commit
0613c4cf06
11
ad_tasks.py
11
ad_tasks.py
@ -95,18 +95,21 @@ def send_cache_data():
|
|||||||
item['y_offset'] = item['area'].split(',')[-1].strip().strip(')')
|
item['y_offset'] = item['area'].split(',')[-1].strip().strip(')')
|
||||||
except:
|
except:
|
||||||
item['y_offset'] = 0
|
item['y_offset'] = 0
|
||||||
|
|
||||||
|
if item.get('jump_param', "") and (item['ad_property'].find("jump_param") == -1):
|
||||||
try:
|
try:
|
||||||
temp = {}
|
temp = {}
|
||||||
temp['jump_param'] = item.get('jump_param', "")
|
temp['jump_param'] = item.get('jump_param', "")
|
||||||
if not item['ad_property']:
|
if not item['ad_property']:
|
||||||
item['ad_property']={}
|
item['ad_property'] = {}
|
||||||
if not isinstance(item.get('ad_property', {}), dict):
|
if not isinstance(item.get('ad_property', {}), dict):
|
||||||
if not item.get('ad_property', {}) :
|
if not item.get('ad_property', {}):
|
||||||
item['ad_property'] = {}.update(temp)
|
item['ad_property'] = {}.update(temp)
|
||||||
else:
|
else:
|
||||||
item['ad_property'] = json.loads(item.get('ad_property', {}).replace("‘", '"').replace("’", '"'))
|
item['ad_property'] = json.loads(
|
||||||
|
item.get('ad_property', {}).replace("‘", '"').replace("’", '"'))
|
||||||
item['ad_property'].update(temp)
|
item['ad_property'].update(temp)
|
||||||
item['ad_property']=json.dumps(item['ad_property'])
|
item['ad_property'] = json.dumps(item['ad_property'])
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error(f"write {item}", exc_info=True)
|
log.error(f"write {item}", exc_info=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user