def topic_test(): start = time.time() topic = Topic("http://www.zhihu.com/topic/19550429") topic.parser() print "Title of the topic is ", topic.get_title() print "Introduction of the topic is ", topic.get_introduction() print "Number of follower of the topic is ", topic.get_follower_num() print "Parent topics are ", topic.get_parent_topic() print "Sample child topics are ", topic.get_sample_child_topic() print "Top answerers of this topic are ", topic.get_top_answerer() topic.save_latest_feed() topic.save_top_answers() # might be time-consuming end = time.time() print "Time used is", end - start