12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # -*- coding: utf-8 -*-
- import json
- import os
- import sys
- sys.path.append(os.getcwd())
- from common.feishu_utils import Feishu
- class Material():
- """
- 获取品类对应负责人任务明细
- """
- @classmethod
- def get_carry_data(cls, dt, FS_SHEET, NAME):
- data = Feishu.get_values_batch( "NFHPswCE7haebJt2m4rcBnuUnUc", FS_SHEET )
- processed_list = []
- try:
- for row in data[2:]:
- activate_data = row[5] # 启动日期
- if not activate_data:
- continue
- if int(activate_data) != int(dt):
- continue
- channel_mark = row[0]
- pq_ids = row[1]
- pq_label = row[2] # 站内标签
- video_id = row[3] # 站内账号id
- title = row[4] #标题类别
- number_dict = {
- "channel_mark": channel_mark,
- "name":NAME,
- "pq_ids": pq_ids,
- "pq_label": pq_label,
- "activate_data": activate_data,
- "video_id": video_id,
- "title": title,
- "dt":dt
- }
- processed_list.append(json.dumps(number_dict, ensure_ascii=False))
- return processed_list
- except:
- return processed_list
|