simple facebook parsing
Project description
zuckup ====== simple facebook parsing
Install
pip install zuckup
Test
Requires nose
nosetests
Usage
zuckup comes with three utilities: insights, page, and page_stats
Insights
NOTE: To get facebook insights data you must first have an access token that has necessary credentials to view this data.
import zuckup
for post_stats in zuckup.insights(page_id='authenticated_page'):
print post_stats
Page Posts
import zuckup
for post in zuckup.page(page_id='nytimes')
print post
Page Stats
import zuckup
page_stats = zuckup.page_stats(page_id='nytimes')
print page_stats
Authentication
zuckup will automatically connect to the facebook api via facepy if you have FB_APP_ID and FB_APP_SECRET set as environmental variables.
Alternatively, you can connect beforehand and pass in this connection via the kwarg conn:
import zuckup
conn = zuckup.connect(app_id='12345', app_secret='678910')
page_stats = zuckup.page_stats(page_id='nytimes', conn=conn)
print page_stats
Finally, if you want to connect with just an access token, say one acquired from a user authenticating to your app, pass in access_token to any of the methods:
import zuckup
page_stats = zuckup.page_stats(page_id='nytimes', access_token='a-users-access-token')
print page_stats
Pagination
paginate through results using paginate with insights and page:
for post in zuckup.page(page_id='nytimes', paginate=True) print post
Concurrency
optional concurrency for insights and page via gevent:
import zuckup for post in zuckup.page(page_id='nytimes', concurrent=True) print post
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file zuckup-0.0.9.tar.gz
.
File metadata
- Download URL: zuckup-0.0.9.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c3bf5eea9ca797189635840e34b8877804308a289d966d90b5682da34c4622 |
|
MD5 | 673bcf6ccadbc75a601513d73b9b14cd |
|
BLAKE2b-256 | 21b53e486d5c185a5d4e4dcf7e5b94360fcfc539e4dde447eea5d96a4fabbc7a |
File details
Details for the file zuckup-0.0.9.macosx-10.9-intel.exe
.
File metadata
- Download URL: zuckup-0.0.9.macosx-10.9-intel.exe
- Upload date:
- Size: 70.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f26eb2c556e4a5eba6034ee5afe0f84535b583449d24b64183ca7be84f16fdd3 |
|
MD5 | 7cf44e142b803bab2bf52391a8e36a19 |
|
BLAKE2b-256 | 25dfd36c84bf93282858e14f30dc0e31b1dbb816ad856660242ce69f003fb3d6 |