Menu

Track what Zhihu is saying about any topic in Python (search, answers, comments to CSV)
📰

Track what Zhihu is saying about any topic in Python (search, answers, comments to CSV)

DEV Community: datascience·Qovia·about 10 hours ago
#KpaDEYQz
#devtodatascience#science#devto#dev#answers
Reading 0:00
15s threshold

I build Qovia, the API used in this post. The structure (search a keyword, group the hits by question, pull the question stats and the top comments, store everything locally) works with any Zhihu data source; the CSV and pandas parts are plain Python.

Zhihu (知乎) is China's big Q&A site, closer to Quora plus a blogging platform than to a social feed. When a new phone, an AI model or a policy change lands, Zhihu is where people write long answers about whether it's any good, and where the comment threads under those answers show what ordinary readers think. If you do market research, product feedback or China-focused analysis, it's one of the most useful places to listen.

In this tutorial we'll write a small Python script that, for one keyword:

checks whether the topic is on Zhihu's hot list right now,

searches recent answers and articles about it and saves them to a CSV,

groups the answers by question and pulls each question's answer, follower and view counts,

collects the hottest comments under the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.