|
@@ -8,6 +8,7 @@ from quart import Blueprint, jsonify, request
|
|
|
|
|
|
from applications.functions.log import logging
|
|
from applications.functions.log import logging
|
|
from applications.schedule import recall_videos, search_videos, re_search_videos
|
|
from applications.schedule import recall_videos, search_videos, re_search_videos
|
|
|
|
+from applications.static.config import db_article
|
|
|
|
|
|
my_blueprint = Blueprint('LongArticles', __name__)
|
|
my_blueprint = Blueprint('LongArticles', __name__)
|
|
|
|
|
|
@@ -62,7 +63,7 @@ def Routes(mysql_client):
|
|
if "video_id=" in title:
|
|
if "video_id=" in title:
|
|
video_id = title.split("video_id=")[-1]
|
|
video_id = title.split("video_id=")[-1]
|
|
insert_sql = f"""
|
|
insert_sql = f"""
|
|
- INSERT INTO long_articles_video
|
|
+ INSERT INTO {db_article}
|
|
(trace_id, gh_id, article_title, article_text, account_name, recall_video_id1)
|
|
(trace_id, gh_id, article_title, article_text, account_name, recall_video_id1)
|
|
VALUES
|
|
VALUES
|
|
('{trace_id}', '{gh_id}', '{title}', '{contents}', '{account_name}', '{video_id}');"""
|
|
('{trace_id}', '{gh_id}', '{title}', '{contents}', '{account_name}', '{video_id}');"""
|
|
@@ -75,7 +76,7 @@ def Routes(mysql_client):
|
|
return jsonify(res)
|
|
return jsonify(res)
|
|
else:
|
|
else:
|
|
insert_sql = f"""
|
|
insert_sql = f"""
|
|
- INSERT INTO long_articles_video
|
|
+ INSERT INTO {db_article}
|
|
(trace_id, gh_id, article_title, article_text, account_name)
|
|
(trace_id, gh_id, article_title, article_text, account_name)
|
|
VALUES
|
|
VALUES
|
|
('{trace_id}', '{gh_id}', '{title}', '{contents}', '{account_name}');"""
|
|
('{trace_id}', '{gh_id}', '{title}', '{contents}', '{account_name}');"""
|