This commit is contained in:
parent
411e14684f
commit
ed358a8a59
|
@ -53,7 +53,7 @@ def collect_crawl_info(spark):
|
|||
def collect_news(spark):
|
||||
df = spark.sql("select * from jd_comment order by created_at desc limit 20")
|
||||
for row in df.rdd.collect():
|
||||
mysql_execute("insert into news (comment_time, content, comment_id) values ('{}', '{}', '{}'')".format(
|
||||
mysql_execute("insert into news (comment_time, content, comment_id) values ('{}', '{}', '{}')".format(
|
||||
row["comment_time"], row["content"], row["id"]))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue