Giter Site home page Giter Site logo

lgulife's People

Stargazers

 avatar  avatar

Watchers

 avatar

lgulife's Issues

How to obtain active post id easily? I think the README may needs update

I find the README document a little out dated. Since a few weeks ago, lgulife has made an modification on its style of post URL.
Although the structure of forming a valid URL hasn't changed too much, except that the post id is not a digital number anymore. It has been transformed from a readable number into a sequence of HEX codes in a random form. Take a recent hot post for e.g. 酸鸡无能狂怒 Its working post id is a2cd858d6ad88ff8e8227893ba9c37e01218bb53, which is crazy, not something that I could find a pattern with😥.
Luckily, your library is still one hundred percent OK as long as the ID given is proper.

>>> c = lgulife.buy("a2cd858d6ad88ff8e8227893ba9c37e01218bb53")
>>> c.comment
{'55848': {'comment_id': '55848', 'date': '26分钟前', 'down': 0, 'hot': False, 'images': [], 'name': '飞翔的抽屉', 'reply_to': None, 'text': 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh', 'up': 0, 'user_id': None}, '55849': {'comment_id': '55849', 'date': '26分钟前', 'down': 0, 'hot': False, 'images': [], 'name': '飞翔的抽屉', 'reply_to': None, 'text': '笑死我了', 'up': 0, 'user_id': None}, '55851': {'comment_id': '55851', 'date': '17分钟前', 'down': 0, 'hot': False, 'images': [], 'name': '睡不着的酸菜鱼', 'reply_to': None, 'text': '笑死了,我也酸了哈哈哈', 'up': 0, 'user_id': None}, '55853': {'comment_id': '55853', 'date': '5分钟前', 'down': 0, 'hot': False, 'images': [], 'name': '有腹肌的水煮鱼', 'reply_to': None, 'text': '尊重他努力的结果,但他天天说自己不卷,没学上了的言论属实是....', 'up': 3, 'user_id': None}, '55854': {'comment_id': '55854', 'date': '刚刚', 'down': 0, 'hot': False, 'images': [], 'name': '侠义非凡的绿豆', 'reply_to': None, 'text': '哈哈哈哈哈哈哈哈哈哈哈', 'up': 0, 'user_id': None}}

However, this change of URL style makes scrawling job much more difficult. Obtaining recent days' posts, and do analysis is not as easy as it was.
I want to know, whether you know some ways to by pass this RANDOM HEX NUMBER BARRIER and make life easier one more time?
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.