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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file faceMongo-0.0.5.tar.gz.
File metadata
- Download URL: faceMongo-0.0.5.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77161664b1ae4f452cf9cd7f3adc7a6e95a1a04c9332166b3618af9426b66011
|
|
| MD5 |
724ae4363226252db3de0630d5e2b6d1
|
|
| BLAKE2b-256 |
437fa04c74d280568507c887ff673a5525cd60a6541230d49cd8124638c97a0c
|
File details
Details for the file faceMongo-0.0.5-py3-none-any.whl.
File metadata
- Download URL: faceMongo-0.0.5-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4afaf84635d81fd962a3cac484d19a250eac33d9ab616f78d6b479361ed4b2f3
|
|
| MD5 |
5607d6588b8460274291f9f122444390
|
|
| BLAKE2b-256 |
d2efab86d0d3c265f2a3f0e2e244707d74c16613381aef73ebb6e65dfc7c6778
|