Code Monkey home page Code Monkey logo

hnrss's Introduction

hnrss — Hacker News RSS

hnrss provides custom, realtime RSS feeds for Hacker News.

The project page explains all available RSS feeds and options.

hnrss's People

Contributors

dduugg avatar edavis avatar edavis215 avatar jaredandrews avatar revett avatar zmwangx 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

hnrss's Issues

JSON Feed author(s) field should be an object, not a string

The JSON Feed specification mentions that the author (v1.0) and authors (v1.1) fields should contain objects, for instance:

{
    "author": {
        "name": "Brent Simmons",
        "url": "http://example.org/",
        "avatar": "https://example.org/avatar.png"
    }
}

The feed produced by hnrss.org uses author as a string:

{
    "author":  "Brent Simmons"
}

Fix double-escaping issues

In <description>, &amp; (and friends) are getting turned into &amp;amp and everything looks all screwy.

If Algolia is escaping stuff properly, should be able to mark it as safe and everything should just work.

Filters

Filters would be brilliant - maybe regexs to filter content?

E.g. having 6 out of 7 uber articles for the last few weeks hurts my soul - I would frankly be happy to remove all .uber. articles, and plenty other "hacker" news.

Project looks rad thanks bunches!

Obsolete date format

hnrss is using obsolete time zone syntax. GMT is defined obsolete in rfc2822. So this format: Tue, 07 Jul 2015 11:37:52 GMT is obsolete and some parsers (such as strptime(3) in libc) failing to parse this format.

Please use +0000 instead of GMT in rss.py:77

Have RSS <link> reflect actual link URL

Currently, the channel-wide <link> element always points to "https://news.ycombinator.com/".

This should be changed to better reflect what the RSS feed represents.

For example, RSS feeds for a given thread should point to the thread URL. RSS feeds for a given user should point to the user's page URL, etc.

Is it possible to search for at least one keyword?

I wonder whether it's possible to search for foo or bar and not how it's default for foo and bar.

Of course it's possible to use two feeds and let the feed reader filter out, but it would be cooler to have this directly in the feed :)

Add points directly to feed title

Suggestion via email:

I'm writing you to suggest the addition of an option to have the
points value show directly in the feed item's title. I already use the
points argument in the feed URL but since I like to have a quick look
even to news whose title doesn't interest me, if the have a very high
score, it would be useful having this feature to avoid having to
always peek at the item body.

Add feed for comments on thread by user

I would like to have a feed for comments made in a thread of a specific user.

The replies feed lists comments on comments by a user, but not comments on a thread by a user.

Maybe the replies feed can be improved to include these as well?

Special Character problem

image

I think some char specification may be missing from the RSS feed.

curl https://hnrss.org/best  
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: Best</title><link>https://news.ycombinator.com/best</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v1.1-7-g101d6c0</generator><lastBuildDate>Mon, 21 Dec 2020 11:28:47 +0000</lastBuildDate><atom:link href="https://hnrss.org/best" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[Paper about Herbalife-related patient death removed after legal threats]]></title><description><![CDATA[
<p>Article URL: <a href="https://scienceintegritydigest.com/2020/12/20/paper-about-herbalife-related-patient-death-removed-after-company-threatens-to-sue-the-journal/">https://scienceintegritydigest.com/2020/12/20/paper-about-herbalife-related-patient-death-removed-after-company-threatens-to-sue-the-journal/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=25492038">https://news.ycombinator.com/item?id=25492038</a></p>
<p>Points: 320</p>
<p># Comments: 54</p>
]]></description><pubDate>Mon, 21 Dec 2020 04:06:02 +0000</pubDate><link>https://scienceintegritydigest.com/2020/12/20/paper-about-herbalife-related-patient-death-removed-after-company-threatens-to-sue-the-journal/</link><dc:creator>computer23</dc:creator><comments>https://news.ycombinator.com/item?id=25492038</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25492038</guid></item><item><title><![CDATA[More challenging projects every programmer should try]]></title><description><![CDATA[
<p>Article URL: <a href="https://web.eecs.utk.edu/~azh/blog/morechallengingprojects.html">https://web.eecs.utk.edu/~azh/blog/morechallengingprojects.html</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=25489879">https://news.ycombinator.com/item?id=25489879</a></p>
<p>Points: 521</p>
<p># Comments: 165</p>
]]></description><pubDate>Sun, 20 Dec 2020 21:53:23 +0000</pubDate><link>https://web.eecs.utk.edu/~azh/blog/morechallengingprojects.html</link><dc:creator>pavehawk2007</dc:creator><comments>https://news.ycombinator.com/item?id=25489879</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25489879</guid></item><item><title><![CDATA[Journalists Hacked with Suspected NSO Group iMessage ‘Zero-Click’ Exploit]]></title><description><![CDATA[
<p>Article URL: <a href="https://citizenlab.ca/2020/12/the-great-ipwn-journalists-hacked-with-suspected-nso-group-imessage-zero-click-exploit/">https://citizenlab.ca/2020/12/the-great-ipwn-journalists-hacked-with-suspected-nso-group-imessage-zero-click-exploit/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=25489298">https://news.ycombinator.com/item?id=25489298</a></p>
<p>Points: 531</p>
<p># Comments: 212</p>
]]></description><pubDate>Sun, 20 Dec 2020 20:36:22 +0000</pubDate><link>https://citizenlab.ca/2020/12/the-great-ipwn-journalists-hacked-with-suspected-nso-group-imessage-zero-click-exploit/</link><dc:creator>arkadiyt</dc:creator><comments>https://news.ycombinator.com/item?id=25489298</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25489298</guid></item><item><title><![CDATA[FFmpeg is 20 years old today]]></title><description><![CDATA[
<p>Article URL: <a href="https://twitter.com/ffmpeg/status/1340698413143224320">https://twitter.com/ffmpeg/status/1340698413143224320</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=25487711">https://news.ycombinator.com/item?id=25487711</a></p>
<p>Points: 431</p>
<p># Comments: 90</p>

RSS feed does not validate

I've been using your feed via Slack for the last few months and it was working great until recently. Lately, new articles show up only occasionally and there are many articles which show up in the RSS feed but which don't make it into Slack.

I reached out to Slack Support to see what was up. They're not sure as to the exact reason for the issues I'm seeing but they did point out that the feed does not validate.

I'm not sure if making the feed valid will fix my issues but I thought it was worth mentioning nonetheless.

Thanks for providing this service. 😄

feed to user´s favorites?

Hi, I was wondering if there's a undocumented way to get a feed for a given user's list of favorite posts.

"Ask HN" has no entry stats

Is it intentional that the entries for "Ask HN" have no stats like upvotes, comments and so on?
I don't know whether other categories have stats or not, just curious whether there's a reason for this :)

Top rated posts over time period

I would like to cut down my daily HN reading and instead consume a list of articles once per week. Sort of like a weekly HN magazine.

cperciva has had a weekly top list for some time https://www.daemonology.net/hn-weekly/

It's notable because it uses a fuzzy notion of week, such that a post that is posted right before the deadline that later goes on to receive enough votes will still be featured the next week.

What I want is the ability to configure the number of posts in this list. cperciva's is fixed to 10.

Is this possible with hnrss'?

Should escape &lt; within code blocks

https://news.ycombinator.com/item?id=15293578

The first code block is:

  $ dig crates.io @ns-a1.io +norecurse

  ; <<>> DiG 9.11.2 <<>> crates.io @ns-a1.io +norecurse
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18874
  ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 3, 
  ADDITIONAL: 1

  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 4096
  ;; QUESTION SECTION:
  ;crates.io.			IN	A

  ;; AUTHORITY SECTION:
  crates.io.		86400	IN	NS	dns3.easydns.ca.
  crates.io.		86400	IN	NS	dns1.easydns.com.
  crates.io.		86400	IN	NS	dns2.easydns.net.

  ;; Query time: 83 msec
  ;; SERVER: 194.0.1.1#53(194.0.1.1)
  ;; WHEN: Wed Sep 20 15:33:13 CEST 2017
  ;; MSG SIZE  rcvd: 127

But renders as:

screen shot 2017-09-20 at 9 21 35 am

Include the parent comment content on replies

If you subscribe to replies to your own posts, the replies are devoid of context, so it's usually several clicks to get to the post referenced by your reply.

This can also be solved with a direct link to the parent post in the content, just what is done now for the frontpage, for example.

Link to comments in article description?

Love this service! Until recently, I was using this for HN RSS. One thing I liked about those feeds was that the description just contained a link to the comment feed. This worked well with my RSS reader: I could read the article from the link, view the comments from the description.

Would it be possible to add a flag to HNRSS allowing the description to instead link to the comments?

Count not working for alternative feeds

Hi!
First of all, thanks for hnrss, it is awesome! :)
I just discovered that there is the count parameter, but it seems like it doesn't affect the alternative feeds at all.
Here is an example:

https://hnrss.org/best?count=5

It still gives back 30 feeds (the default value)

Can we get more specifics on number of calls we can make in a given timeframe?

Sorry if the title doesn't make much sense. I have built a pipeline for automatically scraping new hackernews comments and I'm wondering how often I can call the server to check for new comments. I'm currently checking for new comments every 10 seconds, in which I make a new call using python's feedparser to check for any new comments not included in the last call. It seems like the parser only returns a maximum of 20 new comments every ~5/6 minutes. I'd like to get comments more frequently, and I'm wondering if I am reaching the limit on the number of calls to the server.

Otherwise, this is a great project and it has been very useful for my work. Thank you for all you've been doing!

Add a context link for viewing a comment in it's threaded context?

What do you think about the idea of adding a context link to comment items? Or possibly this would be a query parameter?

https://github.com/edavis/hnrss/blob/849d3f5f7323e0b9f390921e6b1c8c2790cd9341/rss.py#L67-L71

The idea is that when viewing someone's comment, you often need to go up two or three levels of parent before you can actually see what is going on.

Concretely, this changes suggests adding a link (or maybe the default?) which would take you to https://news.ycombinator.com/item?id=17031306#17034806 instead of https://news.ycombinator.com/item?id=17034806

Add license

After reading through the Octotree hubbub, I should probably figure out the licensing situation for hnrss...

To anybody reading this: Any easy to follow guides out there on how to license the code behind something like hnrss.org?

Make hnrss available for external access?

Hello,

Thanks for your implementation, it really looks great!
I know this is more a general Linux/Apache question, but since I'm not that deep into Linux, I dare to ask....

I have setup hnrss on my Linux web server, it's running but only with internal access via 127.0.0.1.
I'd like to make the service available for external access, to integrate it into 3rd party news aggregators like Flipboard.

Do you have any instructions at hand, how to do this?
(I'd like to do this with my own installation of hnrss, in order to be able to increase the hard coded maximum of items to retrieve from the default 100 to a greater number)

I tried setting a IPTable rule to map external port 5000 to internal port 5000, but that did not work.

Any help is welcome!
Thanks in advance.

Sascha.

User feed shows many titles as just ""

For the past few days I'm seeing many entries in the users feed show the title of the Hacker News story in the item title as just "". For example, in the feed https://hnrss.org/user?id=kibwen, the feed now contains an entry like this:

<item>
<title>
<![CDATA[ New comment by kibwen in "" ]]>
</title>
<description>
<![CDATA[ <p>Are we leaping to conclusions by assuming this is referring to an impossible burger/beyond burger sort of product? A "plant-based" burger could also just be the sort of plain old veggie burger that e.g. Burger King has been offering for decades. Is there more detailed information somewhere?</p> ]]>
</description>
<pubDate>Mon, 09 Nov 2020 22:52:28 +0000</pubDate>
<link>https://news.ycombinator.com/item?id=25040947</link>
<dc:creator>kibwen</dc:creator>
<comments>https://news.ycombinator.com/item?id=25040947</comments>
<guid isPermaLink="false">https://news.ycombinator.com/item?id=25040947</guid>
</item>

Add feed preview

Please consider adding a feed preview.

When you open an RSS feed directly in a browser, it will show the raw XML by default [...]. That is not a pleasant way to preview a feed, even if you know XML. And to the rest of us, feeds are not directly accessible at all. Raw XML looks like gibberish to almost everybody.

You could display a simple preview by adding the one line below or, of course, you could create a custom preview. But please consider adding one. You can find more context at https://github.com/frontaid/feed-ui

+ <?xml-stylesheet type="text/xsl" href="https://raw.githubusercontent.com/frontaid/feed-ui/main/preview.xsl"?>
<rss version="2.0">
  <!-- your feed content -->
</rss>

Link preview

Is it possible to add link preview like below

image

Possible GUID isPermalink=false option?

Hey, thanks for this service!
Some feed readers which will opt to use the GUID of an item as the item's link (even if there is a link specified). I believe this is because the RSS 2.0 spec says that the isPermalink attribute of GUID is true by default (and overrides link even if it's specified - though that's a debated area from the few searches I've done).

The feed reader in question is Thunderbird's built-in RSS reader-
Original bug which had them change this behavior: https://bugzilla.mozilla.org/show_bug.cgi?id=327378

Feedly also seems to use the GUID instead of the link and I believe Google Reader used to use it as well before it closed down (thought they may have changed the behavior just before they closed).

Would it be possible to either change the element to or to add an option to append something to the URL so it changes it?

Not at all a critical problem -- using ?link=comments gives you something not too far off but just thought I'd throw it out there -- thanks!

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.