tideillusion / lgulife Goto Github PK
View Code? Open in Web Editor NEWTime capsule on LGULife
License: MIT License
Time capsule on LGULife
License: MIT License
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.
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.