from zhihu_oauth import ZhihuClient
client = ZhihuClient()
client.load_token('token.pkl')
# replace it as user input
# topic
internet = client.from_url('https://www.zhihu.com/topic/19550517')
political = client.from_url('https://www.zhihu.com/topic/19551424')
computer = client.from_url('https://www.zhihu.com/topic/19555547')
occupation = client.from_url('https://www.zhihu.com/topic/19552488')
fishing = client.from_url('https://www.zhihu.com/topic/20022251')
society = client.from_url('https://www.zhihu.com/topic/19566933')
# internet
print(internet.best_answer_count)
print(internet.best_answers_count)
#我也不知道這是啥
for answer in internet.best_answers:
print('internet')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
# political
for answer in political.best_answers:
print('political')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
# computer
for answer in computer.best_answers:
print('computer')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
# occupation
for answer in occupation.best_answers:
print('occupation')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
# fishing
for answer in fishing.best_answers:
print('fishing')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
# society
for answer in society.best_answers:
print('society')
print(answer.question.title)
print(answer.author.name)
print(answer.content)
for comments in answer.comments:
print(comments.content)
print(comments.vote_count)
##the pic data of radar
# internet
print(internet.id)
print(internet.best_answer_count)
print(internet.best_answers_count)
print(internet.follower_count)
print(internet.followers_count)
print(internet.question_count)
print(internet.questions_count)
print(internet.unanswered_count)
# political
print(political.id)
print(political.best_answer_count)
print(political.best_answers_count)
print(political.follower_count)
print(political.followers_count)
print(political.question_count)
print(political.questions_count)
print(political.unanswered_count)
# computer
print(computer.id)
print(computer.best_answer_count)
print(computer.best_answers_count)
print(computer.follower_count)
print(computer.followers_count)
print(computer.question_count)
print(computer.questions_count)
print(computer.unanswered_count)
# occupation
print(occupation.id)
print(occupation.best_answer_count)
print(occupation.best_answers_count)
print(occupation.follower_count)
print(occupation.followers_count)
print(occupation.question_count)
print(occupation.questions_count)
print(occupation.unanswered_count)
# fishing
print(fishing.id)
print(fishing.best_answer_count)
print(fishing.best_answers_count)
print(fishing.follower_count)
print(fishing.followers_count)
print(fishing.question_count)
print(fishing.questions_count)
print(fishing.unanswered_count)
# society
print(society.id)
print(society.best_answer_count)
print(society.best_answers_count)
print(society.follower_count)
print(society.followers_count)
print(society.question_count)
print(society.questions_count)
print(society.unanswered_count)
##the pic data of map
people = client.from_url('https://www.zhihu.com/people/mrfoxlr')
for location in people.locations:
print(location.'name')
dfs()
hackthon代碼
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
- 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來耽装,“玉大人愤炸,你說我怎么就攤上這事〉粞伲” “怎么了规个?”我有些...
- 文/不壞的土叔 我叫張陵,是天一觀的道長姓建。 經(jīng)常有香客問我诞仓,道長,這世上最難降的妖魔是什么速兔? 我笑而不...
- 正文 為了忘掉前任墅拭,我火速辦了婚禮,結果婚禮上涣狗,老公的妹妹穿的比我還像新娘谍婉。我一直安慰自己,他們只是感情好镀钓,可當我...
- 文/花漫 我一把揭開白布穗熬。 她就那樣靜靜地躺著,像睡著了一般丁溅。 火紅的嫁衣襯著肌膚如雪唤蔗。 梳的紋絲不亂的頭發(fā)上,一...
- 文/蒼蘭香墨 我猛地睜開眼塌衰,長吁一口氣:“原來是場噩夢啊……” “哼诉稍!你這毒婦竟也來了?” 一聲冷哼從身側響起最疆,我...
- 正文 年R本政府宣布,位于F島的核電站挟冠,受9級特大地震影響于购,放射性物質發(fā)生泄漏。R本人自食惡果不足惜知染,卻給世界環(huán)境...
- 文/蒙蒙 一肋僧、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧控淡,春花似錦嫌吠、人聲如沸。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至竹伸,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間簇宽,已是汗流浹背勋篓。 一陣腳步聲響...
推薦閱讀更多精彩內容
- 如何在Swift的代碼中使用OC的代碼, 在OC的代碼中使用Swift的代碼? 一、OC的代碼中使用Swift代碼...
- 所有工具已升級趾盐,請使用CC系列工具,舊版已不現(xiàn)維護小腊,目前已無法使用 進入 CC官網(wǎng) 前往 [ 官網(wǎng)下載] Cod...
- 1丹锹、概念 普通代碼塊:在方法或語句中出現(xiàn)的{}就稱為普通代碼塊。普通代碼塊和一般的語句執(zhí)行順序由他們在代碼中出現(xiàn)的...
- 先父類后子類 從上面代碼可得:父類靜態(tài)代碼塊>main函數(shù)(處于父類)>子類靜態(tài)代碼塊>main函數(shù)(處于子類)>...
- 喜歡喝茶勝于咖啡垢啼,但不是那種精于茶道之人窜锯。只是生長在南方,從小就在茉莉茶的清香中長大芭析,對茶有一種依賴锚扎,雖然,于我馁启,...