2012/12/02

【python3】urllib メモ

python3 urllibモジュールの使い方のメモ

>>>import urllib.request
>>>res = urllib.request.urlopen('http://www.yahoo.co.jp/')
>>>html = res.read()
>>>u = res.decode('utf-8','strict')