<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kanjirz50</author_name>
  <author_url>https://blog.hatena.ne.jp/kanjirz50/</author_url>
  <blog_title>かんちゃんの備忘録</blog_title>
  <blog_url>https://kanji.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>【Webスクレイピング Advent Calendar 2017 4日目の記事です。】 Pythonのrequestsモジュールは、 「Requestsは、人が使いやすいように設計されていて、Pythonで書かれている Apache2 Licensed ベースのHTTPライブラリです。」 と公式サイト1文目に記述されているほど、扱いやすいHTTPライブラリです。 そんなrequestsモジュールですが、日本語HTMLを対象に取得する際に文字化けを起こすことがしばしばあります。 その対策や原因について備忘録としてまとめます。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkanji.hatenablog.jp%2Fentry%2Fpython-requests-beautifulsoup-encoding&quot; title=&quot;Pythonのrequestsモジュールでの文字コード対策 - かんちゃんの備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-12-04 00:00:00</published>
  <title>Pythonのrequestsモジュールでの文字コード対策</title>
  <type>rich</type>
  <url>https://kanji.hatenablog.jp/entry/python-requests-beautifulsoup-encoding</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
