2010-06-14から1日間の記事一覧
import urllib url = "http://hoge_euc_jp.com" #ここに文字コードが euc_jp のサイトの url いれる html = urllib.urlopen(url).read() html_utf8 = html.decode("euc_jp", "ignore").encode("utf8") #変換できないエラーを"ignore"で無視する print html_u…
牌語備忘録 -pygo
import urllib url = "http://hoge_euc_jp.com" #ここに文字コードが euc_jp のサイトの url いれる html = urllib.urlopen(url).read() html_utf8 = html.decode("euc_jp", "ignore").encode("utf8") #変換できないエラーを"ignore"で無視する print html_u…