Y
Y
Yaroslav2014-01-29 19:35:46
Java
Yaroslav, 2014-01-29 19:35:46

How to get habrapost karma (and other parameters) by its id?

Actually, I would like to know the parameters of a post on habré for my Java program (such as karma, how many times bookmarked, number of views, etc.).
https://api.habrahabr.ru/v1 writes " {"code":403,"message":"Authorization required","additional":[]} " and somewhere I read that the API on Habré is at the stage development and give access to it only on request.
However, I looked at the code of one application on android for habra - it manually loads and parses the HTML page, looking for the corresponding tags there. I wrote the same thing in 20 minutes in Java using the JSOUP library - and in fact I already have a solution. However, how correct is it? And how will the admins react to it - they will not consider it a hack?
And that page is big. It would be wise to do it through the API ...
And another problem - without authorization, you can not get karma for posts for which the voting period has not yet expired - there is "--" instead of it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2014-01-29
@kciray

https://github.com/kafeman/habrahabr-python#%D0%91...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question