Earlier quoted context omitted.
Use the Firebase libraries rather than the REST one to efficiently handle requests. I believe it uses a websocket internally. "It does all the work for you and is awesome." to quote Nick.
Also, while they don't have a Windows Phone API I previously wrote a COM Windows Scripting API to use it via Chackra from an ASP.Net app. I think it's even easier now that JS is a supported app language.
Hacker News API
201–210 of 315 posts
Re: Hacker News API
#202 pip install hackernews-python
Usage: >>> from hackernews import HackerNews
>>> hn = HackerNews()
>>> hn.top_stories()
[8422599, 8422087, 8422928, 8422581, 8423825...
>>> hn.user('pg')
{'delay': 2, 'id': 'pg', 'submitted': [7494555, 7494520, 749411...
>>> hn.item(7494555)['title'])
Hacker News API
>>> hn.max_item()
8424314
>>> hn.updates()
{'items': [8423690, 8424315, 8424299...], 'profiles': ['exampleuser',...]}
https://github.com/abrinsmead/hackernews-pythonRe: Hacker News API
#203This... is cool, but also kinda sucks for me. I've invested dozens of hours into writing an extremely complicated scraper for my Android version of HN. https://play.google.com/store/apps/details?id=com.airlocksof... The newest version (still under development, probably a month or two from release) adds support for displaying polls, linking to subthreads, and full write support (voting, commenting, submitting, etc). I…
Re: Hacker News API
#204Earlier quoted context omitted.
You can't simply decode each character without losing information. For example, < means a literal If you're just planning on displaying the text in a browser, no decoding is needed. If you want to parse the text to do some sort of textual analysis, an HTML parser library might be best.
I understand what you're talking about re: < and ' You've given me an idea though, so back to vi for me. Thx.
http://us1.php.net/manual/en/function.get-html-translation-t...
absent another source, you could dump it out for your usage elsewhere.
% php -r 'print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES|ENT_HTML5));'
or % php -r 'print json_encode(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES|ENT_HTML5));' | jq .
edit: just found http://dev.w3.org/html5/html-author/charref (but might be harder to parse..)Re: Hacker News API
#205Earlier quoted context omitted.
I understand what you're talking about re: < and ' You've given me an idea though, so back to vi for me. Thx.
not sure if you figured something out already, but just saw your comment and remembered that this exists in PHP: http://us1.php.net/manual/en/function.get-html-translation-t... absent another source, you could dump it out for your usage elsewhere. % php -r 'print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES|ENT_HTML5));' or % php -r 'print json_encode(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES|ENT…
Re: Hacker News API
#206Oh man you guys, patio11 has generated massive amounts of content: https://hacker-news.firebaseio.com/v0/user/patio11.json?prin... I count 8,483 submissions. I'm sure there's something interesting to be done with all of this data. A word frequency chart? --- Edit: So apparently there's a ruby gem that lets you feed it a body of text and generates pseudo-random phrases based on that text. I present to you the patio11…
In February, I did an analysis on all Hacker News stories: http://minimaxir.com/2014/02/hacking-hacker-news/ Yesterday, I published an analysis on all Hacker News comments: http://minimaxir.com/2014/10/hn-comments-about-comments/ There's a lot of interesting trends in the data. Let me know if you want to know anything in particular and I'll get back to you. :)
Re: Hacker News API
#207Now I will have to remove that. Please keep current version of the YC site on a different subdomain.
Re: Hacker News API
#208Earlier quoted context omitted.
It's interesting that you mention the phenomenom of "I remember seeing it (or maybe even saying it) but I cannot find it". This has happened to me a lot. It is intensely frustrating to me because it's blocking - I don't get much done until I re-find whatever it was. I wonder how many other people have this? And what their techniques are?
I have the same problem, and I think the best solution would be to index my web browser search history and be able to search through that index. However that would probably generate a lot of junk. My current solution is to bookmark anything that's vaguely interesting. And when I remember something, I search through the bookmarks. I never look at them, they're just for keeping the stack of stuff to search through.
Re: Hacker News API
#209Earlier quoted context omitted.
Please do convert it, I am working on a project with some of your code as a base!
You're using the app, or the scrapping engine (Hacker Swifter)? The nice thing is that HackerSwifter public API is already in a quite finished state for the available functions, even if I switch to the API, the method calls will be the same.
Re: Hacker News API
#210Earlier quoted context omitted.
In February, I did an analysis on all Hacker News stories: http://minimaxir.com/2014/02/hacking-hacker-news/ Yesterday, I published an analysis on all Hacker News comments: http://minimaxir.com/2014/10/hn-comments-about-comments/ There's a lot of interesting trends in the data. Let me know if you want to know anything in particular and I'll get back to you. :)
I would be interested to know the average hourly cost of HN in lost productivity :)