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
Built Distribution
Hashes for faceMongo-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afaf84635d81fd962a3cac484d19a250eac33d9ab616f78d6b479361ed4b2f3 |
|
MD5 | 5607d6588b8460274291f9f122444390 |
|
BLAKE2b-256 | d2efab86d0d3c265f2a3f0e2e244707d74c16613381aef73ebb6e65dfc7c6778 |