witochandra / webfeed Goto Github PK
View Code? Open in Web Editor NEWA dart package for parsing RSS & Atom feed
License: MIT License
A dart package for parsing RSS & Atom feed
License: MIT License
Since parsing pubDate to DateTime, the timestamp "Fri, 14 Aug 2020" leads to a NULL result.
You can use following RSS feed to check: https://www.helmholtz-berlin.de/pubbin/rss/news?feed=hzb;sprache=en
it will be grate if u override toString methods for Rss Feed Rss Feed Item and e.t.c
on this feed https://www.theverge.com/rss/full.xml
Can we get a version of the package that has null safety enabled?
great packages ! but people sometimes may not know which api to parse the url,it there any good solutions?
RSS Url: https://www.thehindu.com/news/national/feeder/default.rss
webfeed: ^0.7.0
pubDate is coming as null even though Rss XML has the right pubDate.
I tried your example, but the only thing that prints to the console is "Instance of 'RssFeed'" or "Instance of 'AtomFeed'". Depending on if i use the Rss or Atom example
Please update to the latest version of the xml package.
Version 5.4.1 is a bit out of date.
Basically, we just need this PR to get merged => #63
I didn't see anything in the API that provided support for paged Atom feeds. Am I missing it? Is that planned?
I tried your sample code in my main.dart and it's not working. Getting at the below core dart file at findAllElements() call step .......
I've below SDK config in my pubsync ...is this plugin compatible with Dart 2.0 ?
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
import 'dart:core';
import 'package:xml/xml.dart';
XmlElement findElementOrNull(XmlElement element, String name) {
try {
return element.findAllElements(name).first;
} on StateError {
return null;
}
}
https://www.formulapassion.it/feed
<pubDate>Sun, 2 Oct 2022 12:11:52 +0200</pubDate>
Time is detected as 12.11 while it should be 12.11+2.00 = 14.11
how can i solve this ?
Hi, I'm trying to parse a Podcast RSS feed that uses <enclosure>
tags to define the URL that hosts the MP3 file. As far as I can tell there is no support for that tag in webfeed. Is there any particular reason why?
please make compatible for dart 2
Hi, would you mind adding support for a "media:thumbnail" entry within the tag?
Here is an example:
<channel>
...
<media:thumbnail url="http://storage.googleapis.com/androiddevelopers/android_developers_backstage/adb.png"/>
...
</channel>
Also, you might consider offering an escape hatch in your API so that developers can look up tags that either don't fit the spec, or tags that you haven't had a chance to expose yet.
It would be nice if this package can be migrated to Darts null safety.
getting this error when making a 'GET' request (No 'Access-Control-Allow-Origin' header is present on the requested resource)
Hey
It seems we'll have problem with those changes ( XMLElement => XMLElementEvent .... )
https://github.com/renggli/dart-xml/commit/4f7a3237752b4488c3b90fdc71e6c788024287cf?diff=unified
I tried with Webfeed 0.4.1 , but breaking changes in XML 3.3.0 ( 16 days ago ) is to damn high ;)
https://imgur.com/haKpizV.png
Hope we can expect an update π
I in the process of learning flutter and would really really (*5) appreciate
a more complete example of a simple rss to "Card" or anything similar.
I searched but couldnt find anything other than the actual final code.
Any chance of such an example in the near future?
I am working with an RSS feed :
https://weworkremotely.com/categories/remote-programming-jobs.rss
I am not able to get the url of this GIF.
<media:content url="https://wwr-pro.s3.amazonaws.com/logos/0018/2781/logo.gif" type="image/png"/>
I tried various things such as item.media.group.content.attributes.url, but there doesn't seem to be a feature to support this!
This is my Code:
return ListView.builder(
itemCount: _feed.items.length,
itemBuilder: (BuildContext context, int index) {
final item = _feed.items[index];
return ListTile(
title: title(item.title),
subtitle: subtitle(item.pubDate.toString()),
leading: thumbnail(item.media.group.content.attributes.url),
trailing: rightIcon(),
contentPadding: EdgeInsets.all(5.0),
onTap: () => openFeed(item.link),
);
},
);
It would be great, if this feature is added!
Please, back pubDate to accept string instead DateTime! Some feeds has stranges formats dates and DateTime is not able to convert these ones.
Its possible to the RssItem have a optional encoded parameter when finding the content element?
I had a problem to get the content from the blog of the companie client. The content of the blog was returning null every time, then i figure out was the content:encoded in the RssItem, i had to extends some classes to remove the content:encoded from RssItem class, after this the content was returning correctly.
Hello, I'm trying to parse https://videogamezone.eu/feed.xml but it returns StateError (Bad state: No element) both with RssFeed and AtomFeed
Here is the function I'm using rn:
Future<AtomFeed> loadFeed() async {
final client = http.Client();
final response = await client.get(FEED_URL);
print(response.body);
return AtomFeed.parse(response.body);
}
I want to save the rss feed for later use to the SD card, any way to parse from that directory?
Hey there again,
is there a possibility to get the dc:creator tag from a rss feed?
<item>
<title>Cookies!</title>
<pubDate>Sat, 25 Aug 2018 16:46:06 +0000</pubDate>
<link>*****</link>
<guid>****</guid>
<author>[email protected] (Nico_DreamzZ)</author>
<dc:creator>Nico_DreamzZ</dc:creator>
<content:encoded><![CDATA[Cookies are awesome....]]></content:encoded>
</item>
Thanks for your time supporting this!
For rss feeds with <media: thumbnails> there is no compatibility.
Can you add the following attributes to group.dart?
thanks
URL:
http://www.reddit.com/r/news/.rss
More info here:
https://www.reddit.com/wiki/rss/
Code
RssFeed.parse(response.body)
WebFeed error log:
I/flutter (16113): Caught error: Invalid argument(s): not a rss feed
Hey there, i dont know much about rss feeds...
Is there a way to also parse youtube feeds like this https://www.youtube.com/feeds/videos.xml?channel_id=UCKLxFmPc7WHoThSwK8g92Gg with your lib?
The format looks different from my websites rss feed and the parse function throws many errors when unsing the youtube rss feed.
Maybe you can help me :D
YouTube supports the Atom feed for every channel. The below one is just an example and the structure of atom feeds are consistent.
Example:
https://www.youtube.com/feeds/videos.xml?channel_id=UCs5wAPodliO0oVxiTD8ruvg
Replace CHANNEL_ID with the channel you want
https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_ID
I couldn't fetch the info under the <media:group>
.
Hi today with the new Flutter version webfeed fail :(
Because webfeed >=0.5.0 depends on intl ^0.16.0 and every version of flutter_localizations from sdk depends on intl 0.17.0, webfeed >=0.5.0 is incompatible with flutter_localizations from sdk.
So, because oci_balance_app depends on both flutter_localizations any from sdk and webfeed ^0.6.0, version solving failed.
pub get failed (1; So, because oci_balance_app depends on both flutter_localizations any from sdk and webfeed ^0.6.0, version solving failed.)
var rssFeed = new RssFeed.parse(response.body); on the result of fetching https://feeds.pinboard.in/rss/u:andrewducker/ picks up the description, but not any of the items.
Any idea why?
I built an RSSReader to get some news from a german news television shows RSS feed, and since its german it has some special characters in it (ÀüâΓΓΓ) and those get picked up wrong by the UTF-8 encoding:
All of the german special characters get somehow replaced by Γ and some garbage cause the translator adds 2 UTS-8 bytes (dez. 131 & 164) behind the 165 byte which indicates the german and some other special characters.
Is there a way to access custom elements not specified by the RSS model?
For example our XML source has tag (https://www.cheapies.nz/deals/feed)
This library needs an update to support the new Dart SDK version, it would be nice to upgrade it.
/.../SDK/Flutter/flutter/bin/flutter --no-color packages upgrade
Running "flutter packages upgrade" in app...
The current Dart SDK version is 2.1.0-dev.0.0.flutter-be6309690f.
Because app depends on webfeed any which requires SDK version >=1.8.0 <2.0.0, version solving failed.
pub upgrade failed (1)
Process finished with exit code 1
Thank you very much
RssItem not support image.Add these codes to the rss_item.dart file.
final String image;
this.image,
image: findFirstElement(element, 'image')?.text,
Error parsing the feeds from Medium sources. An example of not working sources (i think they are RSS):
I tried with those two, but if you add /feed to any self-domain medium blog you will notice the library can't parse it, it would be nice if you could fix it.
Thank you
Im getting
Another exception was thrown: Invalid argument(s): source must be a String or List<int> (of bytes). You can also pass a RandomAccessFile if you import package:html/parser_console.dart and call useConsole().```
While parsing some feedburner feeds. For example `http://niebezpiecznik.pl/feed`
This code returns an exception on the last line
/// Load data from RSS Feed
Client client = Client();
Response response = await client.get("https://www.apple.com/newsroom/rss-feed.rss");
RssFeed channel;
String rssXml = response.body;
channel = RssFeed.parse(rssXml);
Flutter doc
[β] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.18908.1000], locale en-US)
β’ Flutter version 1.5.4-hotfix.2 at C:\Tools\flutter
β’ Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
β’ Engine revision 52c7a1e849
β’ Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[β] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β’ Android SDK at C:\Tools\Android\Sdk
β’ Android NDK location not configured (optional; useful for native profiling support)
β’ Platform android-28, build-tools 28.0.3
β’ ANDROID_HOME = C:\Tools\Android\Sdk
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
β’ All Android licenses accepted.
[β] Android Studio (version 3.3)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin version 33.3.1
β’ Dart plugin version 182.5215
β’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[β] Connected device (1 available)
β’ ONEPLUS A6013 β’ afa09d33 β’ android-arm64 β’ Android 9 (API 28)
β’ No issues found!```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.