Giter Club home page Giter Club logo

feedek's Introduction

FeedEk jQuery RSS/ATOM Feed Plugin

FeedEk is a jQuery plugin for parsing and displaying RSS and Atom feeds. You can obtain feeds easily from any domain. No need for server-side scripts. Feed API is used for fetching RSS/Atom feed data.

Plugin Homepage

Demo

Feed API Docs

Usage

1- Include jQuery and FeedEk plugin scripts into your page.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="FeedEk.min.js"></script>

2- Add a placeholder for the plugin to your page.

<div id="divFeed"></div>

3- Call the plugin.

- Basic

$('#divFeed').FeedEk({
    FeedUrl : 'https://jquery-plugins.net/rss',
});

- Multiple Feed Url

$('#divFeed').FeedEk({
    FeedUrl : ['https://jquery-plugins.net/rss','http://rss.cnn.com/rss/cnn_topstories.rss']
});

- With Options

$('#divFeed').FeedEk({
    FeedUrl : 'https://jquery-plugins.net/rss',
    MaxCount : 5,
    ShowDesc : true,
    ShowPubDate:true,
    DescCharacterLimit:100,
    TitleLinkTarget:'_blank',
    DateFormat : 'MM/dd/yyyy',
    DateFormatLang : 'en',
    Offset: 5,
    ShowAuthor: true,
    AuthorLabel:"Author:",
    Success: function (feedItems) { },
    Error: function (error) { }
});

Options

  • FeedUrl Your Feed Url and it's required
  • MaxCount Feed Item Count. Default is 5
  • ShowDesc Option to show Feed Item Description. Default is true
  • ShowPubDate Option to show Feed Item Publish Date. Default is true
  • DescCharacterLimit Feed Description Characters Limit Count. Default is no limit
  • TitleLinkTarget Option for Feed Title Link Target. Default is _blank
  • DateFormat Option for Feed Publish Date Format. Default is none
  • DateFormatLang Option for Feed Publish Date Format Language for localization. Default is en
  • Offset Offset option for pagination. Default is 0
  • ShowAuthor Option to show Author of Feed Item. Default is false
  • AuthorLabel Option to set title of author label. Default is Author:. ShowAuthor option must be true to set AuthorLabel.
  • Success Callback to manipulate the DOM element wich contains the Feed Items after the load.
  • Error Callback when error occurs during fetching feeds.

Demo

Plugin Homepage

Demo

feedek's People

Contributors

enginkizil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feedek's Issues

YQL deprecation, moving to independent .js

Since Verizon brought Yahoo they started deprecating non-profitable services, Yahoo Finance and other YQL tables are not working anymore, lucky for us RSS is still working but who knows for how much time?

I've been looking for alternatives and I've found this project https://github.com/bobby-brennan/rss-parser doesn't relay on 3rd party API

example:
<script src="rss-parser.min.js"></script>

<script> RSSParser.parseURL('https://yourRSSurl', function(err, parsed) { parsed.feed.entries.forEach(function(entry) { yourCode }) }) </script>

I think FeedEk could benefit lot, what do you think?

TypeError: data.query.results is null

Hello,
I have a little problem.
I am trying to display a specific feed, http://feeds.feedburner.com/neueswort/ , on my homepage, but it does not work. The rss-feed is most of the times not displayed, sometimes it will appear after a long period of time and will stay for the next two reloads or so, but after that, it disappears again. In the console you can read the error message

TypeError: data.query.results is null

error

It's pretty peculiar that the other feeds I tried out produced this error too, but they were displayed anyway.

It would be really nice if you could help me with this.

Exception when MaxCount is 1

When MaxCount is 1 the response value at data.query.results.rss is not an array but an object. so the $.each won't work and an exception will be thrown because of an member access of undefined. The fix will be to insert following code at line 30:

if ((data.query.results.rss instanceof Array) !== true) {
    data.query.results.rss = [data.query.results.rss];
}

FeedEk Stopped Working

Thought I'd open a new issue. Three users have reported the same issue today:

  • I am also having this issue, it just stop working today and the demo site is not working?
  • Me too. None of my feeds are showing. The demo site is not working either.
  • Another one here! The demo version is not working and it also stopped working on the official site

Firebug is showing the following error with an arrow pointing to the dot in "$.each":
TypeError: data.responseData is null
...cess:function(data){$('#'+idd).empty();$.each(data.responseData.feed.entries,fun...
FeedEk.js (line 1, col 545)

feedek-error

Empty facebook <TITLE>

For some reason Facebook sometimes seems to leave title tags empty in its feed, meaning that FeedEk just displays the date and nothing clickable (the anchor tags are generated, but no contents for them). Is there any way the Facebook feed could use the first X characters of the actual post on facebook rather than the unreliable title data? I guess it would need tags stripped too. No idea how to do this myself I'm afraid, any help welcome!

Need access to ajax request handlers

Please either provide an option that we can pass ajax options to, or return the deferred object so that we can hook into the success/fail handlers of the ajax request to perform modifications to the returned content once it is available.

Feed rendering is mangled if blog entries have images at the top

The rendering of my blog feed was getting mangled (sorry, I did not take a screenshot). I played around with a few settings in the plugin without success, then I realized that the blog entries with images close to the top seemed to be the problem. By dropping the images further down into the blog content, I resolved the issue. Not sure if there is more to it.

bower support

would love to see this located in the power repo no results showed up when i tried bower search feed | grep feedek

in app browser

hello
im trying top open links in app browser cordova
how can it be done ?
thanks this is my fav plug-in

Delay

Hello,

I'm having an issue where there is a delay between when a new blog post is published and when this script reflects the new post. What could be causing this? New posts are shown on the actual rss feed almost right away.

Any suggestions you could provide would be appreciated.

Thank you!

Missing moment-with-locales.js in package

Hi, I think in package is missing moment-with-locales.js script which supports different date examples.

Q: Is it also possible to somehow make that file smaller? 150kb is pretty big for such a small addon.
Thanks for reply.

Not closing </li> in javascript

Very low issue as browsers seem to compensate for a missing <li> in a <ul> but it should be there on the safe side

s += '</li>';

At the last line of the e.each(t.responseData.feed.entries, function (e, t)

I ran into this when I converted this plugin to use <div> instead of <ul><li>. On a side note using div is something you should consider as an option as it allows one to easily put the elements in a bootstrap carousel:

http://twitter.github.io/bootstrap/javascript.html#carousel

Great little plugin btw.

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
s3.buysellads.com/ac/bsa.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
syndication.twitter.com/i/jot?l=%7B%22widget_origin%22%3A%22https%3A%2F%2Fjquery-plugins.net%2FFeedEk%2FFeedEk-examples.html%22%2C%22widget_frame%22%3Afalse%2C%22language%22%3A%22en%22%2C%22message%22%3A%22m%3Anocount%3A%22%2C%22_category_%22%3A%22tfw_client_event%22%2C%22triggered_on%22%3A1546640380472%2C%22dnt%22%3Afalse%2C%22client_version%22%3A%22d3704bd%3A1546534604449%22%2C%22format_version%22%3A1%2C%22event_namespace%22%3A%7B%22client%22%3A%22tfw%22%2C%22page%22%3A%22button%22%2C%22section%22%3A%22share%22%2C%22action%22%3A%22impression%22%7D%7D:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
query.yahooapis.com/v1/public/yql?q=SELECT%20channel.item%20FROM%20feednormalizer%20WHERE%20output%3D%22rss_2.0%22%20AND%20url%20%3D%22http%3A%2F%2Fjquery-plugins.net%2Frss%22%20LIMIT%202&format=json&diagnostics=false&callback=jQuery191010211656993609952_1546640379971&=1546640379972:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
query.yahooapis.com/v1/public/yql?q=SELECT%20channel.item%20FROM%20feednormalizer%20WHERE%20output%3D%22rss_2.0%22%20AND%20url%20%3D%22http%3A%2F%2Fjquery-plugins.net%2Frss%22%20LIMIT%203&format=json&diagnostics=false&callback=jQuery191010211656993609952_1546640379973&
=1546640379974:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
query.yahooapis.com/v1/public/yql?q=SELECT%20channel.item%20FROM%20feednormalizer%20WHERE%20output%3D%22rss_2.0%22%20AND%20url%20%3D%22http%3A%2F%2Fjquery-plugins.net%2Frss%22%20LIMIT%204&format=json&diagnostics=false&callback=jQuery191010211656993609952_1546640379975&=1546640379976:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
query.yahooapis.com/v1/public/yql?q=SELECT%20channel.item%20FROM%20feednormalizer%20WHERE%20output%3D%22rss_2.0%22%20AND%20url%20%3D%22http%3A%2F%2Fjquery-plugins.net%2Frss%22%20LIMIT%202&format=json&diagnostics=false&callback=jQuery191010211656993609952_1546640379977&
=1546640379978:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED

No licence on the code

Would you be able to release it under a licence (usually jQuery plugins are MIT) so that those of us in corporate settings can use/tweak the code?

Multiple source

There's a way to have multiple source in one box only?
Anyway, awesome plugin, thank You.

Invalid date

Is there a different date format requirement using the latest version of FeedEK?

FeedEk not reading atom feed

Hi all,
We are using the FeedEk plugin and it works great with almost all RSS feeds, but when user configures any atom feed url it suddenly generate error. I was digging around and:

it seems that yahoo responds with zero results, but no error is generated. I also tested it with google mail atom feed (https://mail.google.com/mail/feed/atom) and the result is the same.

¿any ideas?
Thanks to all contributors, it's an excellent plugin.

Filter by Date

Hi,

I was working to adapt the code to filter by date (i.e. only show posts from today). I'm not terribly talented at JS, but here's what I came up with. I managed to break the core functionality (error object object method undefined), but it may be a jumping off point - is this possible?

/*
* FeedEk jQuery RSS/ATOM Feed Plugin v1.1.2
* http://jquery-plugins.net/FeedEk/FeedEk.html
* Author : Engin KIZIL 
* http://www.enginkizil.com
*/
(function (e) { e.fn.FeedEk = function (t) { var n = { FeedUrl: "http://rss.cnn.com/rss/edition.rss", MaxCount: 5, ShowDesc: true, ShowPubDate: true, CharacterLimit: 0, TitleLinkTarget: "_blank", onlyToday: false };
 if (t) { e.extend(n, t) } var r = e(this).attr("id");
 var i;
 e("#" + r).empty().append('<div style="padding:3px;"></div>'); e.ajax({ url: "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=" + n.MaxCount + "&output=json&q=" + encodeURIComponent(n.FeedUrl) + "&hl=en&callback=?", dataType: "json", success: function (t) { e("#" + r).empty();}});
 var s = "";
 e.each(t.responseData.feed.entries, function (e, t) { 
     if (n.onlyToday = false)
     {
         s += '<li><div class="itemTitle"><a href="' + t.link + '" target="' + n.TitleLinkTarget + '" >' + t.title + "</a></div>";
 if (n.ShowPubDate) { i = new Date(t.publishedDate);
 s += '<div class="itemDate">' + i.toLocaleDateString() + "</div>" } if (n.ShowDesc) { if (n.DescCharacterLimit > 0 && t.content.length > n.DescCharacterLimit) { s += '<div class="itemContent">' + t.content.substr(0, n.DescCharacterLimit) + "...</div>" } else { s += '<div class="itemContent">' + t.content + "</div>" } }}

    else  {
        date = new Date(t.publishedDate);
        today = new Date(getDate());
        if (date = today)
        {
     s += '<li><div class="itemTitle"><a href="' + t.link + '" target="' + n.TitleLinkTarget + '" >' + t.title + "</a></div>";
 if (n.ShowPubDate) { i = new Date(t.publishedDate);
 s += '<div class="itemDate">' + i.toLocaleDateString() + "</div>" } 
 if (n.ShowDesc) {
 if (n.DescCharacterLimit > 0 && t.content.length > n.DescCharacterLimit) 
 { s += '<div class="itemContent">' + t.content.substr(0, n.DescCharacterLimit) + "...</div>" 
 } 
 else { s += '<div class="itemContent">' + t.content + "</div>" } } } //end if today
        } //end else todayonly
     }); //end each
 e("#" + r).append('<ul class="slides">' + s + "</ul>") } });(jQuery)

Feeds not showing -- https://feed.jquery-plugins.net not working?

Not sure if this is why feeds are not showing, but the website linked to in the FeedEk.js file, https://feed.jquery-plugins.net, does not appear to be working. Below is the error that is showing on Chrome:

This feed.jquery-plugins.net page can’t be found
No webpage was found for the web address: https://feed.jquery-plugins.net/
HTTP ERROR 404

The demo page (https://jquery-plugins.net/FeedEk/FeedEk_demo.html) also doesn't display any feeds.

Get image url

Im trying to get theimage url from the content. how can i get it?

thank u very much if u can help!

Auto-update feed?

Is there a way to have the script automatically check for updated feed?

ERROR_ON_GETTING_FEEDS

When request from : https://jquery-plugins.net/FeedEk/FeedEk_demo.html

FeedEK is getting an error with the message below:

{
data: null
errorMessage: "ERROR_ON_GETTING_FEEDS : Unable to cast object of type 'CodeHollow.FeedReader.Feeds.Rss20FeedItem' to type 'CodeHollow.FeedReader.Feeds.AtomFeedItem'."
statusCode: 400
}

I think the server-side handler(https://feed.jquery-plugins.net/load) is not parsing properly.
Full requested URL:
https://feed.jquery-plugins.net/load?url=https%3A%2F%2Ffeeds.feedburner.com%2Flm%2Frss%2Frecentlyfiled%3Fformat%3Dxml&maxCount=5&dateCulture=en&dateFormat=MM/dd/yyyy

Add open source license

GitHub put it well here ...

It’s easy to get caught up in code. Sharing your code isn’t everything, though: it’s also important to tell people how they can use that code.

And choosealicense.com explains the ramifications of having no license here ...

... the absence of a license means that default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work.

Disallowing use of your code might not be what you intend by “no license.” An open-source license allows reuse of your code while maintaining copyright. If your goal is to explicitly opt-out of copyright protections, try a public domain dedication like the Unlicense or CC0. If you want to share your work with others, you must opt into it.

Even in the absence of a license file, you may grant some rights in cases where you publish your source code to a site that requires accepting terms of service. For example, if you publish your source code in a public repository on GitHub, you have accepted the Terms of Service which do allow other GitHub users some rights. Specifically, you allow others to view and fork your repository.

If having no license was by design, then you may close this issue.

Feed no longer works.

Hello, I would've rather made this more private but I wanted to let you know, your FeedEk is no longer working because it's connected to https://jquery-plugins.net/

As of right now from this message, it's offline and the API no longer works. I would like to ask if there is a way I can use my own server to replace the job. "https://feed.jquery-plugins.net/load?url="

Hopefully, it's just offline for maintenance but kinda sucks that I need to rely on another server.

New API ignores <media:content> and other RSS elements

While old Yahoo's API showed whats in all elements, the new API ignores some RSS elements such as:
<media:content>
and some other elements that are completely ignored too in the output.

As seen in Google's RSS for example: https://www.news.google.com/news/rss/headlines/section/topic/TECHNOLOGY

new API output: https://feed.jquery-plugins.net/load?url=https://www.news.google.com/news/rss/headlines/section/topic/TECHNOLOGY

only basic elements like description, date and title are considered @enginkizil

Google Feed API

FeedEK is no longer working. Same issues as below. Is the Google Feed API working or non-existent?

How can format the date

As the titel says....
I want the date to show a: in dutch and b: in format for example dinsdag 3 sep 2013

Uncaught TypeError: Cannot read property 'rss' of null

I'm trying to adapt my old code (which worked nicely when the Google's API was working) and it's giving me this error.

I replaced my old FeedEk.js and I didn't change anything from the .FeedEk constructor

Could you have an idea why is this happening? These are the lines where the Google Console shows the error

    if (!(data.query.results.rss instanceof Array)) {
        data.query.results.rss = [data.query.results.rss];
    }

License?

Maybe I'm just blind or not looking in the right place or something. How is this licensed?

feedek in application/xhtml+xml

i have an xhtml page with mime of application/xhtml+xml and unfortunately, the rss code does not work. is there any solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.