获取week of year的小程序
#coding=utf8 import urllib, BeautifulSoup web=urllib.urlopen("http://whatweekisit.com/") soup=BeautifulSoup.BeautifulSoup(web.read()) for i in soup.findAll("td")[:6]: print i.text
结果:
Today's date is:
Saturday, November 15th, 2014
Week of the year:
46 of 52
Day of the year:
319 of 365
作者:catmelo
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。