Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thekindlyone/fbadmin
Python library that uses selenium and phantomjs to automate Facebook Group administration
https://github.com/thekindlyone/fbadmin
Last synced: 3 months ago
JSON representation
Python library that uses selenium and phantomjs to automate Facebook Group administration
- Host: GitHub
- URL: https://github.com/thekindlyone/fbadmin
- Owner: thekindlyone
- Created: 2015-01-21T02:33:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-05T10:47:24.000Z (over 6 years ago)
- Last Synced: 2024-07-23T11:34:10.260Z (3 months ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 28
- Watchers: 8
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- starred-awesome - fbadmin - Python library that uses selenium and phantomjs to automate Facebook Group administration (Python)
README
#fbadmin
## A python library to admin facebook groups that uses selenium and phantomjs behind the scenes
[![Supported Python versions](https://img.shields.io/pypi/pyversions/fbadmin.svg)](https://pypi.python.org/pypi//)
[![License](https://img.shields.io/pypi/l/fbadmin.svg)](https://pypi.python.org/pypi/fbadmin/)
[![Development Status](https://img.shields.io/pypi/status/fbadmin.svg)](https://pypi.python.org/pypi/fbadmin/)#### Note: This library is under active development. Lots more to come. To update
```pip install -U --no-deps fbadmin```
### Dependencies
####phantomjs
Easiest way to install phantomjs is via ```npm```
```npm install phantomjs```####other dependencies and the package itself can be installed via pip
```pip install fbadmin```###Usage
####Login and instantiate FBgroup```
from fbadmin import login,FBGroup
group_url='https://www.facebook.com/groups/782652721814257/'
group=FBGroup(login('path/to/credentials.cfg'),group_url)
```
####Print all applicants and the number of groups they are members of.```
for applicant in group.applicants:
print applicant.name,applicant.groupcount
Liviu Vs Ze'us 17
Iliya Tamarkin 24
Raj K Rana 21
Royendgel Silberie 41
Bishnu Prasad Chowdhury 27
Taranjeet Galactus Singh 13
Aws Al-Aisafa 4
أحمد محمود محمد عبدالوهاب 49
Lha Ckg 22
Krishna Jha 10
Bhavesh Nigam 48
Jeevan Anand Anne 19
Sai Sandeep 19
Raga Tarun 25
Tarun Tremendous 48
Aakeem Coleman 37
Bill Pearce 17
Derrick Kearney 17```
####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 = [email protected]
password = youcanttaketheskyfromme
```Suggestions/Comments/Issues can be sent at [email protected]