Skip to content

Instantly share code, notes, and snippets.

@ccbikai
Created January 31, 2014 02:00
Show Gist options
  • Save ccbikai/8725349 to your computer and use it in GitHub Desktop.
Save ccbikai/8725349 to your computer and use it in GitHub Desktop.
提取多说备份评论者邮箱
import simplejson
file_object = open('./export.json')
try:
all_the_text = file_object.read()
finally:
file_object.close()
emails=simplejson.loads(all_the_text)
old_emails = emails.values()[1]
mails = []
for dict in old_emails:
mail = dict.get('author_email')
mails.append(mail)
mails = list(set(mails))
print mails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment