Hacker News RSS Feeds

栏目: IT技术 · 发布时间: 4年前

内容简介:hnrss.org provides custom, realtime RSS feeds forThe following feed types are available:Each feed is

Overview

hnrss.org provides custom, realtime RSS feeds for Hacker News .

The following feed types are available:

New posts and comments as they arrive.
New posts as they appear on the front page.
New posts and comments matching a given search term.
new New comments in reply to a particular user or comment .
New posts with more than N points.
New posts with more than N comments.
New “ Ask HN ” and “ Show HN ” posts, along with polls .
New hiring posts made by YC startups along with comments from the monthly “Who is hiring?” threads.
New posts and comments made by a given user.
New comments made in a given thread .
new In addition to RSS, all of the above are also available in Atom and JSON Feed formats.

Details

Each feed is valid RSS served over HTTPS .

Firehose Feeds

The “firehose” feeds contain all new posts and comments as they appear on Hacker News:

https://hnrss.org/newest
https://hnrss.org/newcomments

For just the posts that have appeared on the front page:

https://hnrss.org/frontpage

If the firehose feeds are a bit too noisy for you,on filtering them with the points and/or comments parameters.

Search Feeds

You can get a feed of new posts and/or comments containing keywords by using the q=KEYWORD parameter. For example:

https://hnrss.org/newest?q=Django
https://hnrss.org/newcomments?q=WordPress

If you want a single search feed but multiple keywords, separate the keywords with " OR ":

https://hnrss.org/newest?q=git+OR+linux

Reply Feeds new

Keep an eye on replies to your comments:

https://hnrss.org/replies?id=jerf

Use a comment ID to follow replies to a particular comment:

https://hnrss.org/replies?id=17752464

Self Post Feeds

Ask HN, Show HN, and polls are available:

https://hnrss.org/ask
https://hnrss.org/show
https://hnrss.org/polls

Job Feeds

Job opportunities from YC funded startups:

https://hnrss.org/jobs

Top level comments in threads created by the whoishiring bot:

# Comments from "Who is hiring?" threads
https://hnrss.org/whoishiring/jobs

# Comments from "Who wants to be hired?" threads
https://hnrss.org/whoishiring/hired

# Comments from "Freelancer? Seeking freelancer?" threads
https://hnrss.org/whoishiring/freelance

# All of the above
https://hnrss.org/whoishiring

new If you’re interested in something in particular, you can apply a q=KEYWORD parameter to only return relevant comments. For example, filter the top-level “Who is hiring?” comments to only those containing “React Native”:

https://hnrss.org/whoishiring/jobs?q=React+Native

User Feeds

If you don’t want to miss a post or comment by a given user, you can subscribe to that user’s feed:

https://hnrss.org/submitted?id=USERNAME # posts
https://hnrss.org/threads?id=USERNAME   # comments
https://hnrss.org/user?id=USERNAME      # everything

Thread Feeds

A feed of new comments on a particular post can be found at:

https://hnrss.org/item?id=THREAD_ID

With THREAD_ID the numerical ID found in the URL when viewing the comments page.

Feed Options

You can modify any feed’s output using URL parameters. Multiple parameters can be applied at the same time by joining them with an ampersand.

Activity Parameters

You can apply a points=N or comments=N parameter to any feed to filter the results so only entries with more than N points or comments are shown:

https://hnrss.org/newest?points=100
https://hnrss.org/ask?comments=25

You can also combine both parameters:

https://hnrss.org/show?points=100&comments=25

Unfortunately, /newcomments does not work with a points=N parameter.

Search Parameter

By default, searches on posts only look at titles. If you want to search against the submitted URLs themselves, use the search_attrs parameter.

Here are some examples:

# Search for posts with "WordPress" in the title only
https://hnrss.org/newest?q=WordPress

# Search for posts with 'WordPress' in the URL only
https://hnrss.org/newest?q=WordPress&search_attrs=url

# Search for posts with 'WordPress' in the title or URL
https://hnrss.org/newest?q=WordPress&search_attrs=title,url

# Don't restrict search attributes at all. This searches for posts
# containing 'WordPress' in all attributes indexed by Algolia. This was
# the behavior of searches prior to June 3, 2015
https://hnrss.org/newest?q=WordPress&search_attrs=default

Link Parameter

By default, the RSS <link> element points to the submitted article’s URL. The <link> element can be changed to point to the Hacker News comment page by appending link=comments to the end of the URL. For example:

https://hnrss.org/newest?link=comments

Description Parameter

You can disable the <description> element entirely by passing the description=0 parameter:

https://hnrss.org/newest?description=0

Count Parameter

By default, feeds return 20 RSS items. This can be increased via the count=N parameter:

https://hnrss.org/newest?count=50

There is a hardcoded limit of 100 entries, so keep that in mind.

Feed Formats new

By default, feeds come back as RSS. But if you add “.atom” or “.jsonfeed” to any endpoint you’ll receive the contents in Atom or JSON Feed , respectively.

# The front page as Atom
https://hnrss.org/frontpage.atom

# "Ask HN" with 10 or more comments as JSON Feed
https://hnrss.org/ask.jsonfeed?comments=10

Note: These formats are a lot less battle-tested than the RSS format. If you see any wonkiness or they don’t play nicely with your feed reader, please open an issue with as much information as possible. Thanks!

Changelog

2018

  • August/September 2018
    • Full changelog entry coming soon
  • January 2018

2017

  • October 2017
    • Add /jobs endpoint.
  • April 2017
    • Add python3 support.
    • Improve handling of search feeds with multiple queries.
    • Cleanup docs and move them to Hugo.
    • Fix warnings from the w3.org feed validator.
  • March 2017
    • Add support for multiple keywords when searching.
  • February 2017
    • Add gzip support.
    • Leave Rackspace, deploy on DigitalOcean.

2016

  • September 2016
    • Add support for HTTP caching headers.
  • July 2016
    • Leave Heroku, deploy on Rackspace.
  • April 2016
    • Add /frontpage.

2015

  • June 2015
    • Set isPermaLink=false on <guid> .
    • By default, searches now look at post titles.

2014

  • June 2014
    • Major rewrite, use different URL structure.
  • May 2014
    • Launched hnrss.org on Heroku.

Support

If hnrss.org has made your job or hobby project easier, and you want to show some gratitude, donations are very much appreciated .

new Another way to support hnrss.org is to use this DigitalOcean referral link and receive $10 in credit. Once you’ve spent $25 with DigitalOcean, hnrss.org will receive $25 in credit.

Thanks!

Credits

Thanks to Algolia for providing their REST API . Without it, hnrss.org simply would not exist.

Thanks to Jared Andrews for the PR that created the /whoishiring/ endpoints.

Thanks to Zhiming Wang for adding Python 3 support.

Thanks to Grant Jenks for the idea of adding the Article URL and Points to the description.

Thanks to Chuck Grimmett for being a sounding board when it comes to adding new features to hnrss.org as well as suggesting the /jobs endpoint.

And many, many thanks to all those who have donated in support of the project over the years. You all mean the world to me.

Colophon

hnrss.org is served by nginx on DigitalOcean. HTTPS is provided by Let’s Encrypt. DNS is provided by Namecheap.

As of September 2018, the feeds are generated using theGin web framework. From May 2014 to August 2018, the feeds were generated using the Flask web framework.

Repositories

A brief primer on the various repositories that make up hnrss.org:

When hnrss.org was created in May 2014, code and documentation lived inside the edavis/hnrss repository.

In April 2017, the documentation was revamped, migrated into Hugo, and was given its own repository at edavis/hnrss-docs . The built assets were copied into the docs/ folder on edavis/hnrss and published at https://edavis.github.io/hnrss/ .

In August/September 2018, hnrss.org underwent a rewrite from Flask to Gin. This new code lives at edavis/go-hnrss .

So, as of September 2018, that’s the state of play. The documentation source lives at edavis/hnrss-docs . The Gin source that powers hnrss.org lives at edavis/go-hnrss .

edavis/hnrss contains the Flask code that powered the site from May 2014 to August 2018 as well as the docs/ folder that contains the built HTML copied from edavis/hnrss-docs .

At some point I’d like to simplify all of this and run everything out of one repository, but it’ll do for now.


以上所述就是小编给大家介绍的《Hacker News RSS Feeds》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

离散数学及其应用

离散数学及其应用

Kenneth H.Rosen / 机械工业出版社 / 2012-11 / 99.00元

本书是介绍离散数学理论和方法的经典教材,已经成为采用率最高的离散数学教材,被美国众多名校用作教材,获得了极大的成功。中文版也已被国内大学广泛采用为教材。作者参考使用教师和学生的反馈,并结合自身对教育的洞察,对第7版做了大量的改进,使其成为更有效的教学工具。. 本书可作为1至2个学期的离散数学课入门教材,适用于数学,计算机科学。计算机工程.信息技术等专业的学生。 本书特点 实例:书中有8......一起来看看 《离散数学及其应用》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

html转js在线工具
html转js在线工具

html转js在线工具