Git Product home page Git Product logo

reddit-bot's Introduction

Simple bot to interact with Reddit via Selenium with Chromedriver

Python Versions License

Usage

First things first, this bot is rather unstable, meaning it has only been tested on Windows, with my internet conection etc... etc.... If you encounter any issues, or have any suggestions, feel free to let me know or contribute yourself.

Currently supported interacions:

  • login
  • upvote/downvote post
  • comment under post
  • join/leave community

Work in progress features:

  • reply to comment
  • create post
  • upvote/downvote last X posts of user/community

Usage

In the desired folder, clone this repository:

> git clone https://github.com/markmelnic/Reddit-Bot

Install the dependencies:

> pip install -r requirements.txt

Download the latest chromedriver here https://chromedriver.chromium.org/downloads and extract chromedriver.exe in the same directory as this script.

Using command line arguments

> py main.py -h

Available flags:

-h, --help:
    Show this help message and exit.

-l, --links:
    [path] File containing liks and actions. The file should be a list of links, one per line, following the structure: url|action|comment (if action is comment). Actions can be one of the following: upvote, downvote, comment, join, leave. The file should be in the same directory as this script.

-a, --accounts:
    [path] File containing credentials for accounts to perform the actions with. The file should be a list of usernames and passwords, one per line, following the structure: username|password. The file should be in the same directory as this script.

-v, --verbose:
    [none] Print INFO messages to stdout.

Examples:

This will downvote the first post, downvote the second one and comment under it, join "r/ProgrammerHumor" community then leave it.

> py main.py --accounts accounts.txt --links posts.txt

where accounts.txt looks like this:

testuser1|testpass1
testuser2|testpass2

and posts.txt looks like this:

https://www.reddit.com/r/ProgrammerHumor/comments/s0f0wd/were_not_the_same_bro/|upvote
https://www.reddit.com/r/ProgrammerHumor/comments/z8ghv8/gotta_save_those_characters/|downvote
https://www.reddit.com/r/ProgrammerHumor/comments/z8ghv8/gotta_save_those_characters/|comment|sad
https://www.reddit.com/r/ProgrammerHumor/|join
https://www.reddit.com/r/ProgrammerHumor/|leave

reddit-bot's People

Contributors

markmelnic avatar wallbloggerbeing 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.