2012-05-01 8 views
3

私はいくつかのRSSフィードを取り、それらに追加されるすべてのアイテムをアーカイブする必要があります。以前はRSSを消費したり作成したりしたことはありませんでしたが、xmlを知っていますので、フォーマットはかなり直感的です。 Is it possible to get RSS archiveRSSフィードをアーカイブする方法は?

私はいくつかのカスタム・ロジックを持っている必要があります知っている:私は、私は完全な履歴を提供するために、フィード・サーバに依存することはできません知っているHow can I get started making a C# RSS Reader?

私はフィードを解析する方法を知っています重複を避けて:how to check uniqueness (non duplication) of a post in an rss feed

私の質問は、どのように私は項目を欠場しないようにすることができますか?私の最初の計画は、フィード内の各項目について、パーサーを書くことです。 1)アーカイブデータベースに既に入っているかどうか確認してください。 2)そうでない場合は、データベースに追加してください。 私はどんなアイテムも見逃してはいけないと確信できますか?

答えて

3

フィードによっては、記事が頻繁に公開され、最新の記事が10件のみ表示されるRSSフィードが設定されていることがあります。いくつかのサイトは反対を行うつもりです。

あなたのアプリは、サイトからの頻度を「学習」し、学習した頻度に基づいてそれらのサイトにpingを実行するのが理想的です。 (例:pingを実行するたびに新しいユニークな記事が表示される場合は、pingを頻繁に行う必要があります。一方、複数の試行で同じ記事のセットが表示された場合は、次回に戻ることがあります)。

+1

です。確認していただきありがとうございます。 –

0

フィードとストレージの制限に基づいて一連の決定を行います。帯域幅の浪費最小限に抑えるために最大限に

 
    Connect to the Web site, and download the XML source of the feed. The Feed Download Engine downloads feeds and enclosures via HTTP or Secure Hypertext Transfer Protocol (HTTPS) protocols only. 

    Transform the feed source into the Windows RSS Platform native format, which is based on RSS 2.0 with additional namespace extensions. (The native format is essentially a superset of all supported formats.) To do this, the Windows RSS Platform requires Microsoft XML (MSXML) 3.0 SP5 or later. 

    Merge new feed items with existing feed items in the feed store. 
    Purge older items from the feed store when the predetermined maximum number of items have been received. 

    Optionally, schedule downloads of enclosures with Background Intelligent Transfer Service (BITS). 

使用例:http:サーバへの影響を制限するために

を、フィードダウンロードエンジンは、HTTP(RFC3229)でデルタエンコーディングと組み合わせるHTTP条件付きGETを実装しますワールドワイドウェブリンク。この実装により、サーバーは、クライアントにキャッシュされたリソースのまったく新しいインスタンスを転送するのではなく、変更の最小記述を転送できます。エンジンは、Microsoft Win32インターネット(WinInet)のHTTP gzipサポートを使用した圧縮もサポートしています。

成功した同期とは、フィードが正常にダウンロードされ、検証され、ネイティブ形式に変換され、ストアにマージされたことを意味します。 HTTP条件付きGET(If-Modified-Since、If-None-Match、ETagなど)に応答してHTTP 304 Not Modifiedのサーバーレスポンスも成功します。

および除去のための基準を定義する:あなたは、このためのサービスに頼るに開放している場合は

 
The following properties directly affect the number of items that remain after a synchronization operation. 

    PubDate—used to determine the "age" of items. If PubDate is not set, LastDownloadTime is used. If the feed is a list, the order of items is predetermined and PubDate (if present) is ignored. 

    MaxItemCount—a per-feed setting that limits the number of archived items. The feed's ItemCount will never exceed the maximum, even if there are more items that could be downloaded from the feed. 

    ItemCountLimit—the upper limit of items for any one feed, normally defined as 2500. The value of MaxItemCount may not exceed this limit. Set MaxItemCount to ItemCountLimit to retain the highest possible number of items. 

参照

2

を...私は自分のRSSアーカイブサービス(https://app.pub.center)。 GoogleのAPIを使用してRSSフィードのデータにアクセスできます。大西洋 の

ページ1

https://pub.center/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=1 大西洋の2ページ https://pub.center/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=2

REST APIは無料です。プッシュ通知の料金プラン(メール、SMS、カスタムAPIエンドポイント)は

関連する問題