php - python scrapy collects Baidu Tieba and stores it in mysql. The storage time of the data is confusing. Is there any way to store it according to the posting time of Baidu Tieba?
阿神
阿神 2017-05-16 13:05:03
0
2
450

Python scrapy collects Baidu Tieba and stores it in mysql. The storage data is chaotic. Is there any way to save it according to the posting time of Baidu Tieba?

Pictured:

< /p>

The following column of times. It is the time when the poster of Baidu Tieba posted the message that I collected. After entering the warehouse, I found that this time is very confusing. There is today's and yesterday's. last month. . . .

If you want to store the chronological order of Baidu Tieba posts into the database.

What ideas are needed to achieve this?

阿神
阿神

闭关修行中......

reply all(2)
phpcn_u1582

Is there no way? Unless you cache all the captured unordered data, sort it and then write it into the database, but the database already has the ability to retrieve data. Why is the poster obsessed with the writing order? order by

我想大声告诉你

Convert the time value from string to time value and sort it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template