首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
如何获取网站页面的更新时间?
omg21
·
2016-04-18 20:54:13 +08:00
· 2505 次点击
这是一个创建于 2936 天前的主题,其中的信息可能已经有所发展或是发生改变。
在浏览器中输入 javascript:alert(document.lastModified) 可以获取网站上 html 页面的更新时间,那么在 Python 中,应该如何做?
Python
页面
alert
获取
2 条回复
1
SlipStupig
2016-04-18 21:53:54 +08:00
>>> k = lambda x: requests.head(x).headers['Date']
>>> k('
http://v2ex.com
')
'Mon, 18 Apr 2016 13:56:07 GMT'
2
omg21
OP
2016-04-18 22:20:14 +08:00
@
SlipStupig
这不是我要的结果,我表述有误,我想要的是页面的上传时间,或者说是页面的建立时间
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
926 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms ·
UTC 19:01
·
PVG 03:01
·
LAX 12:01
·
JFK 15:01
Developed with
CodeLauncher
♥ Do have faith in what you're doing.