よく利用するRSSの形式を一覧でまとめ。
最近良く、ECサイトとの連動で記事のRSSを引いたりするので。基本のRSS2.0。
取得数はカスタマイズしていな限り、
「設定」⇒「表示設定」の「RSS/Atom フィードで表示する最新の投稿数」で決まる。(デフォルトは10件)
基本
新着記事を取得
http://example.com/?feed=rss2
カテゴリ
指定のカテゴリ記事を取得する方法(カテゴリ番号「1」の記事を取得)
http://example.com/?feed=rss2&cat=1
複数のカテゴリ記事を取得する方法(カテゴリ番号「1」と「2」の記事を取得)
カンマで区切ります。
http://example.com/?feed=rss2&cat=1,2
指定のカテゴリ記事を除外する方法(カテゴリ番号「1」の記事を取得しない)
カテゴリ番号の前に「-(マイナス)」記号を入れます。
http://example.com/?feed=rss2&cat=-1
カテゴリ名で取得する方法。あんまり使わないかも。
http://example.com/category/categoryname/?feed=rss2
タグ
指定のタグ設定記事を取得する方法
複数の場合はカテゴリと同様にカンマで区切る。
http://example.com/?feed=rss2&tag=windows,linux,mac
こちらもカテゴリと同様にタグ名で取得する方法。う~ん、あんまり使わないかも。
http://example.com/tag/tagname/?feed=rss2
記事
指定の記事を取得する方法
記事はカンマで区切って複数取得できないみたい。
http://example.com/?feed=rss2&p=1
検索結果
検索結果で得た記事を取得する方法
http://example.com/?feed=rss2&s=美味しい料理
GETパラメータを組み合わせて、Feed取得できるみたい。(カテゴリ3番のタグ「windows」とか)
http://example.com/?feed=rss2&cat=3&tag=windows
必要が出てきたら追記しよー。