获取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

posted @ 2014-11-15 19:53  catmelo  阅读(177)  评论(0编辑  收藏  举报