python爬取网页数据

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python爬取网页数据相关的知识,希望对你有一定的参考价值。

python时间戳

将时间戳转为日期

#!/usr/bin/python
# -*- coding: UTF-8 -*-

# 引入time模块
import time
#时间戳
timeStamp = 1581004800
timeArray = time.localtime(timeStamp)
#转为年-月-日形式
otherStyleTime = time.strftime("%Y-%m-%d ", timeArray)
print(otherStyleTime)

 

python爬取数据教程

 

以上是关于python爬取网页数据的主要内容,如果未能解决你的问题,请参考以下文章