Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 03 22:17
    lostfictions edited #292
  • Sep 03 22:15
    lostfictions opened #292
  • Jun 04 12:12
    outbreak opened #291
  • May 08 20:39
    danmactough closed #290
  • May 08 20:39
    danmactough commented #290
  • May 08 02:45
    chuanqisun opened #290
  • May 06 23:46
    danmactough commented #91
  • May 06 22:52
    yPhil-gh commented #91
  • May 06 22:37
    yPhil-gh commented #289
  • May 06 22:36
    yPhil-gh closed #289
  • May 02 14:55
    yPhil-gh edited #289
  • May 02 14:55
    yPhil-gh edited #289
  • May 02 14:54
    yPhil-gh edited #289
  • May 02 14:53
    yPhil-gh opened #289
  • Apr 02 16:20
    Pomax opened #288
  • Mar 21 01:09
    danmactough closed #287
  • Mar 21 01:09
    danmactough commented #287
  • Mar 20 16:41
    yPhil-gh edited #287
  • Mar 20 16:38
    yPhil-gh edited #287
  • Mar 20 16:37
    yPhil-gh opened #287
Dan MacTough
@danmactough
@Wonko7 Can you point to a gist with your code?
William
@Wonko7
are you up for some clojurescript?
I won't annoy with that, but there's no reason it should stop right? there's no date limit on the entries or anything?
Dan MacTough
@danmactough
feedparser is just a streaming parser. as long as you keep feeding it a feed, it will keep parsing it and emitting items. no limits or sorting or anything like that.
William
@Wonko7
ooh got it, new to node too, readable can be fired multiple times
everything works, thanks
Dan MacTough
@danmactough
:+1:
William
@Wonko7
danmactough: hey, thanks for this, in like 3 days I managed to fill the rss reader shaped hole in my life
Dan MacTough
@danmactough
That's awesome to hear @Wonko7
Cameron Panagrosso
@Cagrosso
Hi Dan, I'm having some trouble understanding what's going on with your Usage example for feedparser.
Why is it that in req.on('response') you are piping the 'stream' to feedparser instead of the response? When I do that, I get an error saying that 'pipe' is not a function. On a whim, I decided to try to pipe the response in and it worked!
Dan MacTough
@danmactough
@Cagrosso if you link to a gist I can take a look, but it's likely a copy paste error on your end. The example code is correct.
betaredex
@betaredex
hey
is there any way to convert a feedparser stream back into xml?
Dan MacTough
@danmactough
Not with feedparser
betaredex
@betaredex
ah thats too bad
im probably going to end up writing my own, should i open a pull request?
betaredex
@betaredex
actually i can probably simply use the rss package
Simon Morgan
@drguildo
why not just fetch the xml before passing it to feedparser?
betaredex
@betaredex
i'm trying to apply user-provided filtering functions
Sumedh More
@DroidBoyJr_twitter
I had one question. a basic one, but not able to wrap my head around it
so once we have passed the request stream to feedparser, does it automatically get the new rss posts from the stream? I mean is it an open stream where ".on('readable')" will keep getting called automatically when new feed is generated on feed server?
Or is it only for the response of one request that we sent with "request"?
Dan MacTough
@danmactough
Just the response to that one request
Simon Morgan
@drguildo
i'm trying to write some code that will only list new articles (only ones since have been posted since after the program was run) but i'm having a very hard time understanding the feedparser docs and getting working code. can anyone help please?
Simon Morgan
@drguildo
so:
program starts
program lists all current articles in feeds and simply notes that they have been seen
program then "listens" for new articles and when it sees one it does something with it
rdbcci
@rdbcci
@drguildo, if your using require('request') to get your responses to pipe to Feedparser, your listening to a dead end. Once require('request') terminates, you must initiate another request.
Simon Morgan
@drguildo
@rdbcci i am doing another request
i set up the handlers and then just do requests but i can't for the life of me get it to work
Simon Morgan
@drguildo
my current problem is that after each request i do a setTimeout but it doesn't seem to be doing anything
Simon Morgan
@drguildo
so do i need to create a whole new request object each time (including event handlers)? can i reuse the feedparser object or do i have to use a new one too?
rdbcci
@rdbcci
Theoretically you should be able to what you want to do. But I would use the iconv.js example as a starting place. https://github.com/danmactough/node-feedparser/blob/master/examples/iconv.js
esmaeiliali
@esmaeiliali
Hi there
I have a question regarding node-feedparser
betaredex
@betaredex
lets hear it
esmaeiliali
@esmaeiliali
I see how this tool can read the rss feed, however once the rss feed updates, it does not show the new ones
is there any way which I can get the new feed coming from the rss?
as an example, lets say right now the rss feed has 5 articles inside it
but within the next hour there might be some articles added to it, so the 5 gets pushed down in the rss and the new ones are on the top
so as each new article comes out I want to display the title on console.log
esmaeiliali
@esmaeiliali
any help would be appreciated
esmaeiliali
@esmaeiliali
I forgot to mention that the rss feed is coming from an external source
Dan MacTough
@danmactough
feedparser just parses feeds. It doesn't fetch them or monitor them. That's up to you. 😀
esmaeiliali
@esmaeiliali
I see, so is there a way to do that?
esmaeiliali
@esmaeiliali
because I am not an expert on nodejs I am looking for something that would be able to integrate with it
Robert Kaussow
@xoxys
hi i try to parse a feed and get all posts newer than a given datetime
has somebody an idea how to start?
esmaeiliali
@esmaeiliali
Hey, one quick question, how would I be able to empty the feed in the feedparser?
@danmactough is there any way to empty the feed in the feedparser? lets say I have the feed from www.foo.com and I want to empty it and refill it with feed from www.bar.com is that possible?
Navid Al Nadvi
@nanadvi
Hi, Do i have to send the response to feedparser as a stream?