Skip to content

Commit

Permalink
Improved get_user_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
rohithpr committed Dec 22, 2014
1 parent 46c3c97 commit 3f00e95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quora/pyquora.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def get_user_stats(user):
err = None

for item in soup.findAll('span', attrs={'class' : 'profile_count'}):
data_stats.append(item.string)
m = re.findall('\d', str(item))
element = ''.join(m)
data_stats.append(element)
data_stats = map(try_cast, data_stats)

user_dict = {'answers' : data_stats[1],
Expand Down

0 comments on commit 3f00e95

Please sign in to comment.