摘要: View Code 1 #!/usr/bin/env python 2 #coding=utf-8 3 while True: 4 n = input() ... 阅读全文
posted @ 2013-03-18 13:56 时光旅行的懒猫 阅读(283) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #!/usr/bin/env python 2 #coding=utf-8 3 import urllib 4 import re 5 def gethtml(url): 6 page = urllib.urlopen(url) 7 html = page.read() 8 page.close() 9 return html10 def getweather(html):11 reg = '<a title=.*?>(.*?)</a>.*?<span>(.*?)</span>.*?<b>(.*?)&l 阅读全文
posted @ 2013-03-18 13:49 时光旅行的懒猫 阅读(395) 评论(0) 推荐(0) 编辑