Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content:encoded Support? #17

Open
ghost opened this issue Mar 8, 2019 · 1 comment
Open

Content:encoded Support? #17

ghost opened this issue Mar 8, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 8, 2019

It seems that there are two ways to keep the text content in RSS feeds. Most of them use the <description> tag, but some of them still use <content:encoded>.

Reference: https://developer.mozilla.org/en-US/docs/Archive/RSS/Article/Why_RSS_Content_Module_is_Popular_-_Including_HTML_Contents

It seems that this service handles the <description> tags only. Is it possible to support the <content:encoded> way as well? Maybe the template is like this:

item.link and item.title
item.desciption
------
item.content:encoded (if it exists)
------
attachments (images?) // audio support is on the way: 
https://github.com/tootsuite/mastodon/pull/9480

Well, I come to request this feature because one of my feeds, https://bots.tinysubversions.com/u/theinitium, is not showing the full text content in Mastodon, and here is a formatted sample: feeds.txt.

And by the way, thanks for your work! It's quite convenient for RSS users!

@ghost
Copy link
Author

ghost commented Jun 29, 2019

According to the relevant issue on rss parser (rbren/rss-parser#8), they did support content:encoded items. Here is the sample code:

let Parser = require('rss-parser');
let parser = new Parser();

(async () => {

  let feed = await parser.parseURL('https://theinitium.com/newsfeed/');
  console.log(feed.title);

  feed.items.forEach(item => {
    console.log(item.title + ':' + item['content:encoded'])
  });

})();

So I hope this issue can be fixed eventually ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants