From ed358a8a59432aacc372bd48c1a957ccf2a2c8f3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Jan 2019 10:24:34 +0800 Subject: [PATCH] . --- chapter3/spark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter3/spark.py b/chapter3/spark.py index b5c0b71..d51df35 100644 --- a/chapter3/spark.py +++ b/chapter3/spark.py @@ -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"]))