Created
May 22, 2016 12:43
-
-
Save nonZero/ef0e20590baade44f095b722ed17ecc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint | |
import pymongo | |
client = pymongo.MongoClient() | |
db = client.get_database('socialagg') | |
# db = client['socialagg'] | |
pages = db.get_collection('pages') | |
# pages = db['pages'] | |
pages.create_index('id', unique=True) | |
for page in pages.find(): | |
pprint(page) | |
print("Done.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment