Comments (5)
Thank you for raising an issue. I tried the example you provided and I also got the same issue although the XML feed is available if I request it in the browser. This library - feedparser-promised
- is a wrapper for https://github.com/danmactough/node-feedparser and here are the things I just tried, without much success:
Bumping node-feedparser
to latest version 🔴
I bumped https://github.com/danmactough/node-feedparser to the latest version (v2.2.10
) and ran the smoke tests (yarn smoke
) with the URL you provided and also got a timeout.
Trying out node-feedparser
directly 🔴
I tried to use the https://github.com/danmactough/node-feedparser directly using the examples provided in their README and I also got a timeout.
Here's what I tried:
Go to https://npm.runkit.com/feedparser and put the following (same code as the README):
var FeedParser = require("feedparser")
var fetch = require('node-fetch'); // for fetching the feed
var req = fetch("https://www.nasdaq.com/feed/rssoutbound?category=Stocks")
var feedparser = new FeedParser();
req.then(function (res) {
if (res.status !== 200) {
throw new Error('Bad status code');
}
else {
// The response `body` -- res.body -- is a stream
res.body.pipe(feedparser);
}
}, function (err) {
// handle any request errors
});
feedparser.on('error', function (error) {
// always handle errors
});
feedparser.on('readable', function () {
// This is where the action is!
var stream = this; // `this` is `feedparser`, which is a stream
var meta = this.meta; // **NOTE** the "meta" is always available in the context of the feedparser instance
var item;
while (item = stream.read()) {
console.log(">>>>>>>>>>>>", item);
}
});
I'm sorry for not come up with the fix for that right away, I'd assume it will require more investigation in the weeds of https://github.com/danmactough/node-feedparser since this library (https://github.com/alabeduarte/feedparser-promised) is just a wrapper, so I would suggest creating an issue there (https://github.com/danmactough/node-feedparser/issues) and see how that goes. If it is something with the library feel free to bump with the new version or even use them directly!
Cheers
from feedparser-promised.
from feedparser-promised.
I'd assume that curl would fall into the same category as "programmatic". If they really block it I'm afraid it could be the case they are not open the RSS to use, hard to say. About different ways you can approach, I'd have a look at the "options" here:
Maybe there is an HTTP option you can pass in via request
, more info here: https://github.com/alabeduarte/feedparser-promised#using-feedparser-options
Sorry not able to provide more info, let me know what you come up with!
Cheers
from feedparser-promised.
from feedparser-promised.
I believe the quickest way to achieve that is to "Watch" this repo (throughout GitHub) so that you subscribe to any changes to the repo. Due to the nature of this library – wrapper – though, the tendency is to always get behind the original code so I'm considering deprecating it.
I'm closing the issue but let me know if there's anything outstanding that I can help you with.
from feedparser-promised.
Related Issues (18)
- Errors aren't handled in the `catch` HOT 2
- Can't load feedparser-promised - broken package? HOT 5
- Duplicate items in feed HOT 9
- Recent update broke passing options to underlying feedparser HOT 7
- Don't include Babel as dependency
- "use strict"; HOT 3
- encoding problems HOT 7
- Parsing XML attributes HOT 3
- App crashes in IE 11 HOT 6
- Parser crashes on this valid RSS feed HOT 3
- The ES6 class syntax makes this unusable in ES5 projects HOT 1
- Update the @types/request = 0.0.45 HOT 4
- Issue with parsing some feeds HOT 2
- Unicode issue with Chinese Language. HOT 4
- How to avoid import stopping on error? HOT 2
- Getting ETIMEDOUT on Amazon AWS Lambda Node 8.10 HOT 4
- Is it possible to remove unwanted characters? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feedparser-promised.