rss_dart 1.0.12 copy "rss_dart: ^1.0.12" to clipboard
rss_dart: ^1.0.12 copied to clipboard

rss_dart is a rss parser for RSS1.0/RSS2.0/Atom. This library is forked from webfeed https://github.com/witochandra/webfeed and dart_rss.

example/main.dart

// ignore_for_file: avoid_print

import 'package:http/http.dart' as http;
import 'package:rss_dart/dart_rss.dart';

void main() {
  final client = http.Client();

  // RSS feed
  client
      .get(
    Uri.parse(
      'https://feeds.podcastindex.org/pc20.xml',
    ),
  )
      .then((response) {
    return response.body;
  }).then((bodyString) {
    final channel = RssFeed.parse(bodyString);
    print(channel.title);
    print(channel.author);
    print(channel.copyright);
    print(channel.description);
    print(channel.docs);
    return channel;
  });

  // Atom feed
  client
      .get(Uri.parse('https://www.theverge.com/rss/index.xml'))
      .then((response) {
    return response.body;
  }).then((bodyString) {
    final feed = AtomFeed.parse(bodyString);
    print(feed.title);

    return feed;
  });
}
5
likes
140
points
2.3k
downloads

Publisher

verified publisherubuntufluttercommunity.org

Weekly Downloads

rss_dart is a rss parser for RSS1.0/RSS2.0/Atom. This library is forked from webfeed https://github.com/witochandra/webfeed and dart_rss.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, intl, xml

More

Packages that depend on rss_dart