<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>piro_suke</author_name>
  <author_url>https://blog.hatena.ne.jp/piro_suke/</author_url>
  <blog_title>ほんじゃーねっと</blog_title>
  <blog_url>https://blog.honjala.net/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>画像を外部URLから取得する際に画像フォーマットが分からない場合、下記の方法で取得できた。 Python Imaging LibraryとDjangoを使った方法。 import urllib from PIL import Image from django.core.files.base import ContentFile image_url = &quot;画像ファイルのURL&quot; f = urllib.urlopen(image_url) # これで取得できるかと思ったけど、「application/octet-strem」とかだと分からない ## file_info = f.info() ##…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.honjala.net%2Fentry%2Fblog%2F2009%2F11%2F04%2F200911041257321935%2F&quot; title=&quot;DjangoとPILで画像のフォーマットを取得 - ほんじゃーねっと&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>2009-11-04 17:05:35</published>
  <title>DjangoとPILで画像のフォーマットを取得</title>
  <type>rich</type>
  <url>https://blog.honjala.net/entry/blog/2009/11/04/200911041257321935/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
