<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hirothin</author_name>
  <author_url>https://blog.hatena.ne.jp/hirothin/</author_url>
  <blog_title>while( life != end ){ do( enjoy ); }</blog_title>
  <blog_url>https://hirothin.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>PythonでXMLの要素を抜き出す このアプローチでは問題があることに気付いた！RSS配信されているニュースは、そのXMLをパースして処理した方が確実で効率的。 いちいちニュースサイトのレイアウト解析して、ニュースのリンクのみ抜き出して・・って時代じゃないよね。-; ということで再チャレンジ！ 新アプローチ手順 １．RSSリンクからXMLをminidomに食わせる ２．あとは前回の方法で、必要なデータを抽出する。 [ Sample.py ]import urllib2 import sys from xml.dom import minidom, Node#今回追加した関数 def urlP…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhirothin.hatenadiary.org%2Fentry%2F20080730%2F1217407065&quot; title=&quot;PythonでXMLの要素を抜き出す[RSSからでしょ編] - while( life != end ){ do( enjoy ); }&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>2008-07-30 17:37:45</published>
  <title>PythonでXMLの要素を抜き出す[RSSからでしょ編]</title>
  <type>rich</type>
  <url>https://hirothin.hatenadiary.org/entry/20080730/1217407065</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
