Skip to content

Commit

Permalink
Added question details and answer wiki csu#37
Browse files Browse the repository at this point in the history
  • Loading branch information
rohithpr committed Jan 5, 2015
1 parent 9017887 commit 973dba3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quora/quora.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,16 @@ def scrape_question_stats(soup):
want_answers = soup.find('span', attrs={'class' : 'count'}).string
answer_count = soup.find('div', attrs={'class' : 'answer_count'}).next.split()[0]
question_text = list(soup.find('div', attrs = {'class' : 'question_text_edit'}).find('h1').children)[-1]
question_details = soup.find('div', attrs = {'class' : 'question_details_text'}).string
answer_wiki = soup.find('div', attrs = {'class' : 'AnswerWikiArea'}).find('div')

question_dict = {'want_answers' : try_cast_int(want_answers),
'answer_count' : try_cast_int(answer_count),
'question_text' : question_text,
'topics' : topics }
'topics' : topics,
'question_details' : question_details,
'answer_wiki' : answer_wiki,
}
return question_dict

@staticmethod
Expand Down

0 comments on commit 973dba3

Please sign in to comment.