[Python] python打开url并按指定快大写读取网页内容 →→→→→进入此内容的聊天室

来自 , 2019-04-20, 写在 Python, 查看 109 次.
URL http://www.code666.cn/view/df1a336b
  1. import urllib
  2. pagehandler = urllib.urlopen("http://www.google.com")
  3. outputfile = open("index.html", "wb")
  4. while 1:
  5.     data = pagehandler.read(512)
  6.     if not data:
  7.         break
  8.     outputfile.write(data)
  9. outputfile.close()
  10. pagehandler.close()
  11.  
  12. #//python/8087

回复 "python打开url并按指定快大写读取网页内容"

这儿你可以回复上面这条便签

captcha