Giter Site home page Giter Site logo

tauhu / facebook-posts-automation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adar2/facebook-posts-automation

0.0 0.0 0.0 76 KB

Facebook Automation, post automation ,groups social scraping and personal account scheduled and distributed posts , written in python and selenium

License: GNU General Public License v3.0

Python 100.00%

facebook-posts-automation's Introduction

Facebook-Posts-Automation

Making publishing posts on Facebook easier and faster by using a bot posting to many pages very fast, getting a list of group members out of Facebook group and even scheduling posts to different dates and hours. The bot was built using pure python with selenium as the client, SQLite3 for database and PyQt5 for GUI.

img

Dependencies

selenium~=3.141.0

pyqt5~=5.14.2

pysqlite3

keyring~=10.6.0

cryptography>=3.2

Installation

pip install selenium pyqt5 pysqlite3 cryptography keyring

or

pip install -r requirements.txt

You also need to have mozilla geckodriver you can get it here geckodriver.

If you wish to use some other browser binary supported by selenium (i.e. Chrome), you need to edit 'Bot.py'.

replace :

self.driver = webdriver.Firefox(options=self.options)

with something like :

self.driver = webdriver.Chrome(options=self.options)

Make sure you have geckodriver binary (or any other browser) in project directory or you might want to specify the path in Bot.py.

E.g. self.driver = webdriver.Firefox(executable_path="/data/Drivers/geckodriver",options=self.options)

Usage

When you've got all of it ready, you can start the gui by execute python main.py in command line.

You need first to create a user by clicking the add user button, a dialog window will open, enter username and password and click ok.

img

Once you've got your user created you can continue and add posts,targets and scheduled tasks all of those will be stored in the database for the user who created them and will remain there until you delete them.

Login:

Select the user from the existing users dropdown, and click the login button. You can choose to run the browser driver headless or not by checking the hide browser checkbox.

Post:

First you need to create post by clicking the add post button, insert the post content and select the media file using the dialog browse button. both field are optional but at least one of them must be non empty in order to create new post.

img

Add target by clicking the add target button and entering facebook url you wish to post to.

img

Now go ahead and select one post from the posts list, you can select one or more targets from the targets list by using Ctrl or Shift and click the post button.

Scrape:

Add a group target i.e facebook.com/group/123456, using the add target button.

Select the group target you've added and click the scrape button.

List with group users and their facebook profile link will show in the log text.

Tasks:

Tasks are comprised of post, one or more targets,date and task name.

img

Each task is associated with the user created that task, means that the task will execute as that user, you can schedule multiple tasks for multiple users at the same time.

The tasks executor runs on separate thread so you can select the tasks you want to schedule to run and continue to use the script.

You can run tasks by selecting one or more tasks from the tasks list and click the run task button.

Load File:

You can load a json like file containing your posts and targets.

the structure for the json file should be as follow:

{
    "posts":[
                {"msg":"sometext1" ,"media":""},
                {"msg":"sometext2", "media":"C:\\some_media_path"}
            ],
    "targets":[
                {"target": "https://www.facebook.com/groups/189076xxxx"},
                {"target": "https://www.facebook.com/groups/189076xxxx"}
              ]
}

facebook-posts-automation's People

Contributors

adar2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.