Skip to main content

simple facebook parsing

Project description

travis-img 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


Download files

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

Source Distribution

zuckup-0.0.8.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

zuckup-0.0.8.macosx-10.9-intel.exe (70.8 kB view details)

Uploaded Source

File details

Details for the file zuckup-0.0.8.tar.gz.

File metadata

  • Download URL: zuckup-0.0.8.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zuckup-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e57b423cfef3037c92d665148e4eb30a0ffa21397b9fb3f4591fdb9069f6c9af
MD5 2a65945f83d254420e52182cc040f2fa
BLAKE2b-256 3741960a2d1cae82d91c3f601aab95a81fc025504484597b10b62d110ed90cb9

See more details on using hashes here.

File details

Details for the file zuckup-0.0.8.macosx-10.9-intel.exe.

File metadata

File hashes

Hashes for zuckup-0.0.8.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 2c9e4d6a8524f9b489d8a27a28b1c4e4f58f358b4730709df2971c9e904ecb73
MD5 2201796f72f9a50db9966bcd703723c6
BLAKE2b-256 831cded21407d05b7a25c4e876594535ef25d6c79c3a176d0c2c765c8cdccd33

See more details on using hashes here.

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