bennyguitar / libhn Goto Github PK
View Code? Open in Web Editor NEWThe definitive Objective-C library for adding HackerNews to your iOS/Mac app.
License: MIT License
The definitive Objective-C library for adding HackerNews to your iOS/Mac app.
License: MIT License
Yeah, since this morning, the scrapping of the news page (potentially) does not work anymore. I did not yet had the time to look at it.
I'm doing my own HN Client, mostly to test out Swift and latest iOS 8 features, it can be found here
https://github.com/Dimillian/SwiftHN
I thinking about writing my own library for scrapping HN, all in Swift, and I need a few features than LibHN doesn't offer, like a caching mechanism for example.
I don't know what you think about that, or if you plan to rewrite it someday, I think I'll begin mine this during August.
Hey!
Fetching the comments and author username when loading posts is not working.
Can you fix it or tell us how to fix it?
Thanks!
Hi, I'm having some troubles using libHN since it was upgraded to 4.x. I'm currently running 4.0.2 and a simple loadPostsWithFilter gives me back an empty HNPost array. I don't think I've changed anything on my end, so is there some piece I'm missing since the upgrade, maybe something to do with hn.json? Here's the main code, for reference: https://github.com/amitburst/HackerNews/blob/master/HackerNews/MainViewController.swift.
Thanks!
Top and New stories doesn't load.
Best stories and Ask will load the titles but no comments.
Using an iOS application that uses your library. I'm going to take a look and possibly submit a pull request.. but wanted this submitted as an issue first.
When attempting to login with a password containing an ampersand (&), authentication fails. I'm assuming escaping/encoding isn't occurring.. but could be wrong.
Replying to a comment and a post is not working
I was wondering if you guys are having the same issue.
Whenever I tried to use this method, it always return BOOL success=NO, even though it posted successfully.
I ended up making multiple repeated post to HN when testing my app and got slowbanned, lol.
User is automatically logged out every time. I suppose it may be the cookie
I checked with you app aswell, HN must have changed something. How did you reverse engineer it? Maybe I can have a go at fixing it if you don't have the time.
libHN 3.0.0
Just wanted to give a shout out :)
Comments won't load on the latest version of libHN. It seems to be working on older version of libHN.
See this issue: nealyoung/HackerFeed#5, I confirmed that this also occurs in other apps using libHN.
Seeing this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
Seems to be originating from HNManager.m, line 279
Hey @bennyguitar . I didn't realize this till recently but Login seems to be broken.
This is the crash:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
The crash from the logs occurs here:
MackerNews 0x000000010d5438f3 __51-[HNManager loginWithUsername:password:completion:]_block_invoke (HNManager.m:126)
I was trying to debug and I can't tell what changed on HN site. Looking at the breakpoints I set its going here: https://github.com/bennyguitar/libHN/blob/master/Source/HNWebService.m#L210
On the HN website the login form is still use "act" & "pw" fields for the form. So yeah not sure what's going on. Happy to debug further if you have any insights
Login works but once i close the app & open it, isUserloggedin returns false
I think this is because of the website than libHN.
I found out about it because I was using commentID to collapse and expand comments.
It seems that in a few of the Ask post, all of the comments have the same ID.
Also, so far I'm unable to NSLog the ParentID for any of the comments. They all return as null.
You ought to set s.requires_arc = true
in the podspec.
There are also a few minor leaks (at least in HNWebService).
Could you add Hacker News Reader to the readme list?
Thanks for all the work you've done!!
Multiple apps, including my HN Reader app have been broken for a few days now. Not sure if the recent commit broke the scraper?
I don't know if this is intentional, so my apology if it is not an issue. Just something I've noticed.
[[HNManager sharedManager] loadPostsWithUrlAddition:[[HNManager sharedManager] postUrlAddition] completion:^(NSArray *posts) {
if (posts) {}
else{}
The else condition never gets trigger.
Instead, I had to an another if condition inside
if (posts) { if ([posts count]==0) {}}
to keep it from slamming the server.
See title. I tested with proxy to be sure it isn't just slowbanned.
News/YC is also not showing any comments.
Broke date + comment date + content.
Refer to this if you want a quick fix :) Dimillian/HackerSwifter@de8c903
I was wondering if you're having issues with this.
When I vote on a post, add it to the HNManager votedOnDictionary and reload my data, everything works correctly. The post is shown as voted on
But if I restart my app, it's showing as not voted on.
Is there a plan to switch to the Official API before they start making rendering changes on Oct 28th?
Check out Objective-C style guides for more info.
I have noticed in AskHN, the post.commentCount is 0 even though there are many many comments.
This only happens with some of the AskHN post.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.