2015年3月25日

Python3 使用 urllib 實例

http://uds.tw/page.php?i=51

( Python3 使用 urllib.request )
import urllib.request

fp = urllib.request.urlopen("http://www.python.org")

mybytes = fp.read()

mystr = mybytes.decode("utf8")

fp.close()


print(mystr)





沒有留言:

張貼留言