|
@@ -8,12 +8,30 @@ from argparse import ArgumentParser
|
|
|
|
|
|
from applications import longArticlesMySQL, bot
|
|
|
from coldStartTasks.crawler.weixinCategoryCrawler import weixinCategory
|
|
|
+from coldStartTasks.publish.publish_single_video_pool_videos import PublishSingleVideoPoolVideos
|
|
|
from coldStartTasks.publish.publishCategoryArticles import CategoryColdStartTask
|
|
|
from coldStartTasks.filter.title_similarity_task import ColdStartTitleSimilarityTask
|
|
|
|
|
|
DEFAULT_CATEGORY_LIST = ['1030-手动挑号', 'account_association']
|
|
|
|
|
|
|
|
|
+def publish_single_video_task():
|
|
|
+ """
|
|
|
+ 从视频内容池获取抓取
|
|
|
+ """
|
|
|
+ try:
|
|
|
+ publish_single_video_pool_videos = PublishSingleVideoPoolVideos()
|
|
|
+ publish_single_video_pool_videos.deal()
|
|
|
+ except Exception as e:
|
|
|
+ bot(
|
|
|
+ title="视频内容池发布任务发布识别",
|
|
|
+ detail={
|
|
|
+ "error": str(e),
|
|
|
+ "error_msg": traceback.format_exc()
|
|
|
+ }
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
class AccountColdStartDailyTask(object):
|
|
|
"""
|
|
|
账号冷启动代码
|
|
@@ -73,7 +91,7 @@ class AccountColdStartDailyTask(object):
|
|
|
}
|
|
|
)
|
|
|
|
|
|
- def publish_task(self, category_list, article_source):
|
|
|
+ def publish_article_task(self, category_list, article_source):
|
|
|
"""
|
|
|
将账号文章发布到aigc抓取计划,并且绑定生成计划
|
|
|
:param category_list: 文章品类
|
|
@@ -109,6 +127,10 @@ def main(date_str, category_list=None, article_source=None):
|
|
|
main job, use crontab to do job daily
|
|
|
:return:
|
|
|
"""
|
|
|
+ # 首先发布视频内容池
|
|
|
+ publish_single_video_task()
|
|
|
+
|
|
|
+ # 再处理文章内容池
|
|
|
if not category_list:
|
|
|
category_list = DEFAULT_CATEGORY_LIST
|
|
|
if not article_source:
|
|
@@ -118,7 +140,7 @@ def main(date_str, category_list=None, article_source=None):
|
|
|
if article_source == 'weixin':
|
|
|
task.crawler_task(category_list=category_list, date_str=date_str)
|
|
|
|
|
|
- task.publish_task(category_list=category_list, article_source=article_source)
|
|
|
+ task.publish_article_task(category_list=category_list, article_source=article_source)
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|