Skip to content

Commit

Permalink
Merge pull request csu#21 from praroh2/master
Browse files Browse the repository at this point in the history
Improved get_user_stats
  • Loading branch information
csu committed Dec 22, 2014
2 parents a5712cf + 3f00e95 commit 16c966f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions quora/pyquora.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ def get_user_stats(user):
m = re.findall('\d', str(item))
element = ''.join(m)
data_stats.append(element)
data_stats = map(try_cast, data_stats)

user_dict = {'answers' : try_cast(data_stats[1]),
user_dict = {'answers' : data_stats[1],
'blogs' : err,
'edits' : try_cast(data_stats[5]),
'followers' : try_cast(data_stats[3]),
'following' : try_cast(data_stats[4]),
'edits' : data_stats[5],
'followers' : data_stats[3],
'following' : data_stats[4],
'name' : name,
'posts' : try_cast(data_stats[2]),
'questions' : try_cast(data_stats[0]),
'posts' : data_stats[2],
'questions' : data_stats[0],
'topics' : err,
'username' : user }
return user_dict
Expand Down

0 comments on commit 16c966f

Please sign in to comment.