[過去ログ] 【PHP】下らねぇ質問はここに書き込みやがれ 11 (1002レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
886
(2): (ワッチョイ 6f2c-ORmy) 2021/04/09(金)09:13 ID:PljcoBP70(1) AAS
Ruby では、RSS::Parser で、RSS/ATOM をパースできる

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="外部リンク:www.w3.org
<title>サンプル</title>
<updated>2003-12-13T18:30:02Z</updated>
<author><name>あいう</name></author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>

<entry>
<title>タイトル 1</title>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
</entry>
</feed>

require 'rss'

atom = File.read( "./input.atom" )
feed = RSS::Parser.parse( atom )

feed.items.each { |item| puts "#{ item.title.content }" }
#=> タイトル 1
1-
あと 116 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.008s