Skip to main content

A python library to automate facebook group administration

Project description

Dependencies

phantomjs

Easiest way to install phantomjs is via npm
npm install phantomjs

selenium

pip install selenium

Usage

Login and instantiate FBgroup

from fbadmin import login,FBGroup
group_url='https://www.facebook.com/groups/782652721814257/'
group=FBGroup(login(),group_url)

Block if member of more than 100 groups and approve if member of less than 10 groups

for applicant in group.applicants:
    if applicant.groupcount>100:
        group.block(applicant)
    elif applicant.groupcount<=10:
        group.approve(applicant)

Get members

for page in group.get_members():
    for member in page:
        print member.name #prints member names one page at a time

Get source of member’s homepage(for spam analysis)

html=group.peak(member.url)

Teardown when done with it

group.quit()

Please look at the code for other functionality. There are docstrings.

needs a config file of following format to be saved as credentials.cfg

#This is the configuration file. Enter FB credentials here.
[credentials]
email = malcolmreynolds@serenity.com
password = youcanttaketheskyfromme

Suggestions/Comments/Issues can be sent at dodo.dodder@gmail.com

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

fbadmin-0.1.0.2.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file fbadmin-0.1.0.2.tar.gz.

File metadata

  • Download URL: fbadmin-0.1.0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fbadmin-0.1.0.2.tar.gz
Algorithm Hash digest
SHA256 0073c7b40866a58c73c5c336a6c80fd08911898355e4c48065869cfd0ea4f6c4
MD5 2014435592e63638b0ca4d23bd1ca8bd
BLAKE2b-256 ba3fb2e5d1bb9de82e76967fcc7436c1608ec2904936b7af94917194cbe0716d

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