<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kagasu</author_name>
  <author_url>https://blog.hatena.ne.jp/kagasu/</author_url>
  <blog_title>備忘録</blog_title>
  <blog_url>https://kagasu.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Ⅰ. はじめに タイトルの通り「PythonでMagikaを利用してMIMEを取得する方法」です。 Ⅱ. サンプルプログラム # pip install magika from magika import Magika magika = Magika() with open('c:\\test.png', 'rb') as f: res = magika.identify_stream(f) print(res.output.label) print(res.output.mime_type) 実行結果 png image/png 参考 https://github.com/google/ma…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagasu.hatenablog.com%2Fentry%2F2025%2F11%2F24%2F150854&quot; title=&quot;PythonでMagikaを利用してMIMEを取得する方法 - 備忘録&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>2025-11-24 15:08:54</published>
  <title>PythonでMagikaを利用してMIMEを取得する方法</title>
  <type>rich</type>
  <url>https://kagasu.hatenablog.com/entry/2025/11/24/150854</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
