Skip to main content

Scrape facebook public page to mongo database

Project description


faceMongo


Scrape facebook public page and save it in a mongo database as a collection of documents. Retrieve a collection from mongo database.


Installattion


Run the following command in your terminal to install the package

pip install faceMongo

Usage


Scraping facebook public page Using donaldtrump and saviing it in a mongo database named facebook. Assuming you have a mongo database installed locally.

The following code will retrive and save the document in your mongo database

from faceMongo import faceMongo

fm = faceMongo.FaceMongo('facebook','localhost',27017) # database, host and port
fm.fb_page_to_db('donaldtrump') # scrape donaldtrump page to database

Retrieving collection from the mongo database To retrive donaldtrump collection from the facebook database, The code below will return the collection of documents in a list

docs = fm.docs_from_db('donaldtrump' )


Licence


MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faceMongo-0.0.5.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

faceMongo-0.0.5-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page