studylog/北の雲

chainer/python/nlp

2015-08-21から1日間の記事一覧

Requests(python)で文字化けする場合

RequestsはシンプルなHTTPライブラリですがよく文字化けします。Shift_JISのサイトだと多めな印象。 html = requests.get("http://Shift_JISのサイト") print(html.encoding) #=> ISO-8859-1 なのでここを参考に [Python]requestsが正しくエンコード情報を返…