搜尋套件、儲存庫與 APP 分類

套件詳情v0.7.0

webfeed

webfeed 是一個用於解析 RSS 和 Atom 訂閱來源的 Dart 套件。也支援 Media、DublinCore、iTunes 和 Syndication 命名空間。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
624
喜歡數
114
Pub 分數
120

安裝套件

flutter pub add webfeed

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

webfeed 是一個用於解析 RSS 和 Atom 訂閱來源的 Dart 套件,支援 Media、DublinCore、iTunes 和 Syndication 等核心命名空間。它讓開發者能輕鬆提取並處理跨平台的訂閱來源資料。此套件非常適合從部落格、新聞網站或播客中取得內容的應用程式,提供對標題、描述、作者與元資料的結構化存取。支援 Android、iOS、Web、macOS、Windows 和 Linux,確保跨平台相容性。其輕量級設計與直覺的 API,讓初學者與資深開發者皆能輕鬆上手。

適用情境

  • 解析 RSS 和 Atom 源
  • 提取播客元數據
  • 聚合部落格內容
  • 建構新聞閱讀器
  • 支援媒體豐富的動態訊息

主要特色

  • 支援 RSS 和 Atom 格式
  • 處理媒體、DublinCore、iTunes、聚合命名空間
  • 跨平台相容性
  • 簡單直覺的 API
  • 強大的餵送驗證

適合對象

  • 新聞和內容聚合應用
  • 播客播放器
  • 部落格讀者
  • RSS 源整合
  • 跨平台資訊源消費者

使用建議

  • 需要有效的源網址
  • 僅限解析;無法取得訊息來源
  • 可能需要對格式錯誤的來源進行額外處理
  • 不適用於即時資料更新
  • 依賴外部資訊來源的可靠性

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

WebFeed

Build Status Pub

A dart package for parsing RSS and Atom feed.

Features
  • [x] RSS (0.9, 1.0, & 2.0)
  • [x] Atom
  • [x] Namespaces
    • [x] Media RSS
    • [x] Dublin Core
    • [x] iTunes
    • [x] Syndication
Installing

Add this line into your pubspec.yaml

webfeed: ^0.7.0

Import the package into your dart code using:

import 'package:webfeed/webfeed.dart';
Example

To parse string into RssFeed object use:

var rssFeed = RssFeed.parse(xmlString); // for parsing RSS feed
var atomFeed = AtomFeed.parse(xmlString); // for parsing Atom feed
Preview

RSS

feed.title
feed.description
feed.link
feed.author
feed.items
feed.image
feed.cloud
feed.categories
feed.skipDays
feed.skipHours
feed.lastBuildDate
feed.language
feed.generator
feed.copyright
feed.docs
feed.managingEditor
feed.rating
feed.webMaster
feed.ttl
feed.dc

RssItem item = feed.items.first;
item.title
item.description
item.link
item.categories
item.guid
item.pubDate
item.author
item.comments
item.source
item.media
item.enclosure
item.dc

Atom

feed.id
feed.title
feed.updated
feed.items
feed.links
feed.authors
feed.contributors
feed.categories
feed.generator
feed.icon
feed.logo
feed.rights
feed.subtitle

AtomItem item = feed.items.first;
item.id
item.title
item.updated
item.authors
item.links
item.categories
item.contributors
item.source
item.published
item.content
item.summary
item.rights
item.media

License

WebFeed is licensed under the MIT License - see the LICENSE.md file for details

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案