def _dict_to_question(d): question = Question() question.title = d['title'] question.url = d['url'] return question
def _to_question(question_element, story): question = Question() question.title = _question_title(question_element, story) question.url = _question_url(question_element) return question
def _dict_to_question(d): question = Question() question.title = d['title'] question.url = d['url'] return question
def _to_question(question_element, story): question = Question() question.title = _question_title(question_element, story) question.url = _question_url(question_element) url_valid = ZhihuDailyOfficial._is_question_url_valid(question.url) return question if url_valid else None
def _to_question(question_element): question = Question() question_title_element = _get_question_title_element(question_element) if question_title_element: question.title = question_title_element.get_text() question.url = _get_question_url(question_element) return question