Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
842 views
in Technique[技术] by (71.8m points)

do a sqlite search from python at date interval

For an e-commerce site, I have a date in my python written as follows:

>>>date_scrap': now.strftime ("% d /% m /% Y% H:% M:% S"),
>>>id_scrap = cursor.lastrowid
>>>insert_database = (id_scrap, row["date_scrap"], row["EAN"], row["price"], row["titre"], 
                           row["seller"])
>>>cursor.execute('INSERT INTO recond_scrap VALUES(?,?,?,?,?,?)', insert_database)

That's OK.

on a sqlite table

CREATE TABLE "recond_scrap" (
  "id_scrap" INTEGER,
  "date_scrap" TEXT,
  "EAN" TEXT,
  "price" REAL,
  "title" TEXT,
  "seller" TEXT,
  PRIMARY KEY ("id_scrap" AUTOINCREMENT)
  )

I would like to do an update every 8 hours and therefore check that this date is more than 8 hours but I cannot. Can you help me please. thank you


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...