|
@@ -28,11 +28,12 @@ class PiaoQuanPipeline:
|
|
|
self.mysql = AsyncMysqlService(platform=platform, mode=mode)
|
|
|
self.logger = LoggerManager.get_logger(platform=platform, mode=mode)
|
|
|
self.aliyun_log = LoggerManager.get_aliyun_logger(platform=platform, mode=mode)
|
|
|
+ self.feishu_spreadsheet_token = "KsoMsyP2ghleM9tzBfmcEEXBnXg"
|
|
|
|
|
|
async def feishu_time_list(self):
|
|
|
async with FeishuDataAsync() as feishu_data:
|
|
|
summary = await feishu_data.get_values(
|
|
|
- spreadsheet_token="KsoMsyP2ghleM9tzBfmcEEXBnXg",
|
|
|
+ spreadsheet_token=self.feishu_spreadsheet_token,
|
|
|
sheet_id="RuLK77"
|
|
|
)
|
|
|
for row in summary[1:]:
|
|
@@ -43,7 +44,7 @@ class PiaoQuanPipeline:
|
|
|
async def feishu_list(self):
|
|
|
async with FeishuDataAsync() as feishu_data:
|
|
|
summary = await feishu_data.get_values(
|
|
|
- spreadsheet_token="KsoMsyP2ghleM9tzBfmcEEXBnXg",
|
|
|
+ spreadsheet_token=self.feishu_spreadsheet_token,
|
|
|
sheet_id="letS93"
|
|
|
)
|
|
|
for row in summary[1:]:
|
|
@@ -51,6 +52,17 @@ class PiaoQuanPipeline:
|
|
|
return row[1]
|
|
|
return None
|
|
|
|
|
|
+ async def title_restricted_words(self):
|
|
|
+ async with FeishuDataAsync() as feishu_data:
|
|
|
+ summary = await feishu_data.get_values(
|
|
|
+ spreadsheet_token=self.feishu_spreadsheet_token,
|
|
|
+ sheet_id="BS9uyu"
|
|
|
+ )
|
|
|
+ for row in summary[1:]:
|
|
|
+ if row[0] == self.platform:
|
|
|
+ return row[1]
|
|
|
+ return None
|
|
|
+
|
|
|
async def publish_time_flag(self) -> bool:
|
|
|
publish_ts = self.item.get("publish_time_stamp", int(time.time()))
|
|
|
update_ts = self.item.get("update_time_stamp", int(time.time()))
|
|
@@ -145,6 +157,7 @@ class PiaoQuanPipeline:
|
|
|
"""
|
|
|
视频基础下载规则
|
|
|
:return:
|
|
|
+ "rule": "[{\"period\":{\"min\":15,\"max\":3}},{\"duration\":{\"min\":50,\"max\":0}},{\"share_cnt\":{\"min\":2,\"max\":0}},{\"videos_cnt\":{\"min\":300,\"max\":0}}]",
|
|
|
"""
|
|
|
for key in self.item:
|
|
|
if self.rule_dict.get(key):
|