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

feat ⚒️ support for opml files #16

Open
murtuzaalisurti opened this issue Jan 15, 2024 · 0 comments
Open

feat ⚒️ support for opml files #16

murtuzaalisurti opened this issue Jan 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@murtuzaalisurti
Copy link
Owner

extract feeds from opml files

import xml2js from "xml2js";

fetch("https://daverupert.com/rss-club/feeds.xml")
  .then((res) => {
    return res.text();
  })
  .then((data) => {
    // console.log(data);
    xml2js.parseString(data, (err, result) => {
      if (err) {
        console.error(err);
        return;
      }
      console.log(
        JSON.stringify(result.opml.body[0].outline[0].outline.length, null, 2),
      );
      for (let feed of result.opml.body[0].outline[0].outline) {
        console.log(feed.$.xmlUrl);
      }
    });
  });

reference

opml feed

@murtuzaalisurti murtuzaalisurti added the enhancement New feature or request label Jan 15, 2024
@murtuzaalisurti murtuzaalisurti self-assigned this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant