Giter Site home page Giter Site logo

mrpowerscripts / reddit-karma-farming-bot Goto Github PK

View Code? Open in Web Editor NEW
297.0 297.0 120.0 598 KB

"Is karma really that important to you? Damn bro, you need a life" - YouTube Comment

Home Page: https://mrpowerscripts.com

License: MIT License

Python 96.98% Shell 2.35% Batchfile 0.35% Dockerfile 0.32%
chatbot machine-learning reddit

reddit-karma-farming-bot's Introduction

I'm MrPowerScripts

Hi! I'm MrPowerScripts. I started creating educational content on youtube over eight years ago. Which evolved into a blog, and Podcast. I built a fun project called the Reddit Karma Farming Bot a few years ago which has grown a lot thanks to contributions from the awesome people in the MrPowerScripts Discord Community.

Go with the flow, and Learn, Code, Grow!

reddit-karma-farming-bot's People

Contributors

akshatj27 avatar anonymous4547 avatar avnsx avatar brandonbr1 avatar denizoral avatar gabrielmajosi avatar harrybak avatar laman-git avatar lquyet avatar mrpowerscripts avatar sesseor avatar szepnapot avatar taiten312 avatar thirstycode avatar travis-owens avatar xpl0itu avatar zegevlier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reddit-karma-farming-bot's Issues

Database is locked

On first run, getting this error:

2020-06-22 02:20:04,591 INFO learn(59) looping through submissions
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 263, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/src/run.py", line 1, in <module>
    import init
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/src/init.py", line 5, in <module>
    import reddit
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/src/reddit.py", line 12, in <module>
    import bot
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/src/bot.py", line 10, in <module>
    base_brain = Brain(MAIN_DB)
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/venv/lib/python3.8/site-packages/cobe/brain.py", line 47, in __init__
    version = graph.get_info_text("version")
  File "/Users/ps/reddit-test/reddit-karma-farming-bot/venv/lib/python3.8/site-packages/cobe/brain.py", line 505, in get_info_text
    row = c.execute(q, (attribute,)).fetchone()
sqlite3.OperationalError: database is locked

Script is broken

The reddit karma bot is scanning subreddits but not finding any training data

Database disk image is malformed

I always get this error while I let the but learning:
database disk image is malformed

I never touched something in the source. I just edited the utils.py & settings.py

I just started in newly on Windows 10 Ubuntu TLS "sub-system" using via the cmd bash command

Error exactly:

`2020-12-24 00:06:16,376 INFO init(71)
THE BOT IS WORKING. IT WILL TAKE ABOUT 8 HOURS FOR IT TO LEARN AND START COMMENTING.

2020-12-24 00:06:16,379 INFO init(72) fast learning
2020-12-24 00:06:16,379 INFO learn(63) checking submission
2020-12-24 00:06:16,381 INFO learn(13) trying to learn
2020-12-24 00:06:16,384 INFO learn(17) db size: 2.56640625
2020-12-24 00:06:16,386 INFO learn(35) SUBREDDIT_LIST is active
2020-12-24 00:06:16,388 INFO learn(36) learning from: comedyheaven
2020-12-24 00:06:16,389 INFO learn(54) active db : /mnt/c/Users/root/reddit-karma-farming-bot/src/brains/comedyheaven.db
2020-12-24 00:06:16,394 INFO learn(59) looping through submissions
2020-12-24 00:06:16,823 INFO learn(63) checking submission
2020-12-24 00:06:17,818 INFO learn(63) checking submission
2020-12-24 00:06:18,106 INFO learn(63) checking submission
2020-12-24 00:06:19,225 INFO learn(63) checking submission
2020-12-24 00:06:19,519 INFO learn(63) checking submission
2020-12-24 00:06:21,384 INFO learn(63) checking submission
2020-12-24 00:06:25,658 INFO learn(63) checking submission
2020-12-24 00:06:26,954 INFO learn(63) checking submission
2020-12-24 00:06:27,474 INFO learn(102) database disk image is malformed
Traceback (most recent call last):
File "/mnt/c/Users/root/reddit-karma-farming-bot/src/learn.py", line 92, in learn
comment_body.encode("utf8")
File "/mnt/c/Users/root/reddit-karma-farming-bot/venv/lib/python3.6/site-packages/cobe/brain.py", line 125, in learn
self._learn_tokens(tokens)
File "/mnt/c/Users/root/reddit-karma-farming-bot/venv/lib/python3.6/site-packages/cobe/brain.py", line 180, in _learn_tokens
stemmer=self.stemmer)
File "/mnt/c/Users/root/reddit-karma-farming-bot/venv/lib/python3.6/site-packages/cobe/brain.py", line 530, in get_token_by_text
row = c.execute(q, (text,)).fetchone()
sqlite3.DatabaseError: database disk image is malformed
2020-12-24 00:06:27,489 INFO init(75) new db size: 2.5234375
2020-12-24 00:06:27,495 INFO countdown(358) sleeping: 2 seconds
2020-12-24 00:06:27,543 INFO learn(63) checking submission
2020-12-24 00:06:27,864 INFO learn(99) done learning
2020-12-24 00:06:27,872 INFO init(75) new db size: 1.7265625
2020-12-24 00:06:27,882 INFO countdown(358) sleeping: 2 seconds`

ModuleNotFoundError: No module named 'Stemmer'

I am trying to run the .bat file but it just says this:

Traceback (most recent call last):
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\init.py", line 4, in <module>
    import bot
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\bot.py", line 1, in <module>
    from bots.reddit import RedditBot
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\bots\reddit\__init__.py", line 1, in <module>
    from .bot import RedditBot
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\bots\reddit\bot.py", line 5, in <module>
    from bots.reddit.actions.comments.comment_actions import Comments
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\bots\reddit\actions\comments\comment_actions.py", line 1, in <module>
    from .sources.cobe import Cobe
  File "C:\Users\daste\Desktop\reddit-karma-farming-bot-master\src\bots\reddit\actions\comments\sources\cobe.py", line 1, in <module>
    from cobe.brain import Brain
  File "C:\Users\daste\.virtualenvs\reddit-karma-farming-bot-master-Oa0UVMUL\lib\site-packages\cobe\brain.py", line 16, in <module>
    from . import tokenizers
  File "C:\Users\daste\.virtualenvs\reddit-karma-farming-bot-master-Oa0UVMUL\lib\site-packages\cobe\tokenizers.py", line 4, in <module>
    import Stemmer
ModuleNotFoundError: No module named 'Stemmer'
exiting...

It also says this:

Processing c:\users\daste\desktop\reddit-karma-farming-bot-master\deps\windows\pystemmer-2.0.1-cp39-cp39-win_amd64.whl
PyStemmer is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.
Installing dependencies from Pipfile.lock (2dc5ba)...
  ================================ 1/1 - 00:00:00
An error occurred while installing pystemmer==2.0.1 --hash=sha256:9b81c35302f1d2a5ad9465b85986db246990db93d97d3e8f129269ed7102788e! Will try again.
Installing initially failed dependencies...

How can I fix this?
I did pip install PyStemmer, but it doesn't help.

Bot can't start

IOError: [Errno 13] Permission denied: '/home/(Name)/Desktop/reddit-karma-farming-bot/info.log'

Brain Python Library Code

May I please ask for a rundown of how the Brain python library code, responsible for the database and choosing which tokens/learned-words the bot will be using for the reply, is written because I would like to attempt customizing it to make it more efficient.

yaml

Hello, everytime I run the windows bat i get this

Edit: I fixed the Issue now I have this one

Traceback (most recent call last):
File "./src/init.py", line 4, in
import bot
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\bot.py", line 1, in
from bots.reddit import RedditBot
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\bots\reddit_init_.py", line 1, in
from .bot import RedditBot
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\bots\reddit\bot.py", line 1, in
from apis import reddit_api
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\apis_init_.py", line 1, in
from config import reddit_config
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\config\reddit_config.py", line 27, in
config_gen()
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\config\reddit\config_gen.py", line 48, in config_gen
if authenticated(reddit) is True:
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\config\reddit\config_gen.py", line 34, in authenticated
reddit.user.me()
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\praw\models\user.py", line 134, in me
user_data = self._reddit.get(API_PATH["me"])
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\praw\reddit.py", line 497, in get
return self._objectify_request(method="GET", params=params, path=path)
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\praw\reddit.py", line 584, in _objectify_request
path=path,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\praw\reddit.py", line 765, in request
json=json,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\sessions.py", line 339, in request
url=url,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\sessions.py", line 235, in _request_with_retries
url,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\sessions.py", line 195, in _make_request
timeout=timeout,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\rate_limit.py", line 35, in call
kwargs["headers"] = set_header_callback()
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\sessions.py", line 282, in _set_header_callback
self._authorizer.refresh()
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\auth.py", line 356, in refresh
password=self._password,
File "C:\Users\Acer.virtualenvs\reddit-karma-farming-bot-master-5y-raNLJ\lib\site-packages\prawcore\auth.py", line 157, in _request_token
response, payload["error"], payload.get("error_description")
prawcore.exceptions.OAuthException: invalid_grant error processing request

rkfb 4.0 needs to be reinstalled

rkfb 4 sometimes breaks and needs to be completely reinstalled. I'm not sure of the cause but it could be something to look into.

Karma Bot 2.1

When I first made v2.0 of the bot I decided to build it around Docker. Since docker runs on everything, everyone will be able to use it! Well, not everyone knows docker as it turns out, and docker works a bit differently on every platform. So, back to the drawing board to simplify the bot.

Goals:

  • primarily run the bot natively with python once again
  • make docker optional
  • remove a lot of cruft

Environments to support:

  • Windows
  • Linux
  • MacOS
  • Android

Technically all the environments are supported right now, but it isn't easy to get it set up. need to make it easy for each env. update a shared config file, and then click a button. maybe a batch/PowerShell file for windows, bash for linux/mac/android.

Other things to improve:

  • remove nltk dependency. causes a big download every time the bot starts and isn't used
  • Have everything run self-contained in the cloned repo (brain database, config, etc) rather than the home folder
  • Have the bot reply to posts directly instead of other peoples comments.
  • have the bot repost stuff again

The pip file and the pipfile.lock isnt updated with imgur libraries causing the errors to come up

2020-07-11T06:30:18.857453+00:00 app[worker.1]: info loggin
2020-07-11T06:30:18.866553+00:00 app[worker.1]: Traceback (most recent call last):
2020-07-11T06:30:18.866559+00:00 app[worker.1]:   File "./src/run.py", line 1, in <module>
2020-07-11T06:30:18.866774+00:00 app[worker.1]:     import init
2020-07-11T06:30:18.866800+00:00 app[worker.1]:   File "/app/src/init.py", line 5, in <module>
2020-07-11T06:30:18.867004+00:00 app[worker.1]:     import reddit
2020-07-11T06:30:18.867030+00:00 app[worker.1]:   File "/app/src/reddit.py", line 11, in <module>
2020-07-11T06:30:18.867185+00:00 app[worker.1]:     import bot
2020-07-11T06:30:18.867190+00:00 app[worker.1]:   File "/app/src/bot.py", line 7, in <module>
2020-07-11T06:30:18.867316+00:00 app[worker.1]:     from utils import MAIN_DB
2020-07-11T06:30:18.867319+00:00 app[worker.1]:   File "/app/src/utils.py", line 13, in <module>
2020-07-11T06:30:18.867446+00:00 app[worker.1]:     from imgurpython import ImgurClient
2020-07-11T06:30:18.867497+00:00 app[worker.1]: ModuleNotFoundError: No module named 'imgurpython'

Heroku Not Working I guess...

it stuck...

2020-08-19T12:12:25.019772+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=lets-ruin-reddit.herokuapp.com request_id=b85beab8-efa1-41bc-8837-3fcb6134ac9f fwd="85.153.202.155" dyno= connect= service= status=503 bytes= protocol=https

2020-08-19T12:12:25.777949+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=lets-ruin-reddit.herokuapp.com request_id=0938fb2c-0196-4f28-a53a-a68631e91df3 fwd="85.153.202.155" dyno= connect= service= status=503 bytes= protocol=https

Unraid Support

Are there any plans to add Unraid support or at least add it to Docker Hub to make the install easier?

prawcore.exceptions.Forbidden: received 403 HTTP response exiting... `

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\reddit-karma-farming-bot-4.0.3\src\init.py", line 10, in <module> bot.run() File "C:\Users\Administrator\Desktop\reddit-karma-farming-bot-4.0.3\src\bot.py", line 8, in run reddit.run() File "C:\Users\Administrator\Desktop\reddit-karma-farming-bot-4.0.3\src\bots\reddit\bot.py", line 57, in run self.tick() File "C:\Users\Administrator\Desktop\reddit-karma-farming-bot-4.0.3\src\bots\reddit\bot.py", line 53, in tick action.call() File "C:\Users\Administrator\Desktop\reddit-karma-farming-bot-4.0.3\src\bots\reddit\actions\comments\comment_actions.py", line 64, in comment comment.reply(self.comments.get_reply(comment.body)) File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\praw\models\reddit\mixins\replyable.py", line 38, in reply comments = self._reddit.post(API_PATH["comment"], data=data) File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\praw\reddit.py", line 752, in post return self._objectify_request( File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\praw\reddit.py", line 666, in _objectify_request self.request( File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\praw\reddit.py", line 848, in request return self._core.request( File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\prawcore\sessions.py", line 324, in request return self._request_with_retries( File "C:\Users\Administrator\.virtualenvs\reddit-karma-farming-bot-4.0.3-AnlWK8Lr\lib\site-packages\prawcore\sessions.py", line 260, in _request_with_retries raise self.STATUS_EXCEPTIONS[response.status_code](response) prawcore.exceptions.Forbidden: received 403 HTTP response exiting...

AttributeError: 'NoneType' object has no attribute 'lower'

Whenever I try running the bot on windows/linux and it tries reposting a post it just spits this error out. I've redownloaded the code like 4 times and it still happens.

Traceback (most recent call last):
  File "./src/init.py", line 10, in <module>
    bot.run()
  File "/root/reddit-karma-farming-bot/src/bot.py", line 8, in run
    reddit.run()
  File "/root/reddit-karma-farming-bot/src/bots/reddit/bot.py", line 62, in run
    self.tick()
  File "/root/reddit-karma-farming-bot/src/bots/reddit/bot.py", line 57, in tick
    action.call()
  File "/root/reddit-karma-farming-bot/src/bots/reddit/actions/post_actions.py", line 70, in repost
    sub = self.rapi.subreddit(self.crosspost(sub.display_name))
  File "/root/reddit-karma-farming-bot/.venv/lib/python3.8/site-packages/praw/models/helpers.py", line 183, in __call__
    lower_name = display_name.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

better SLEEP SCHEDULE

USE_SLEEP_SCHEDULE = False
BOT_SCHEDULES = [
{"days": 0, "schedule": [((4,00),(5,00)), ((17,30),(19,30))]},
{"days": 4, "schedule": [((8,00),(10,00)), ((20,30),(23,20))]},

so the schedule will use a timer like this
n = (chosen number + random number [1-3])
x = 24-n
SCHEDULES = x+n
then repeat

Heroku Build Failed...

! No default language could be detected for this app. HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. See https://devcenter.heroku.com/articles/buildpacks ! Push failed

Pull access denied

Firstly, sorry for being so annoying. I'm on MacOS. I keep receiving this error when attempting to run the docker
ad23ae912bb6be4f629f9903867ed044

Ignore posts whose titles contain banned words

Currently banned words are only used when training for comments.
It would be nice if certain words that get bots called out when reposting submissions like "today, yesterday, my, mine, birthday" would be filtered from post titles. Better yet would be completely ignoring such posts because just replacing those words with "" could create nonsensical results. Like, "Today is Johnny Depp's birthday" would become "is Johnny Depp's", and both titles would be very bad.

error?

09:14:07 using schedules: []
Traceback (most recent call last):
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\utils.py", line 40, in check_internet
urllib.request.urlopen(host, None, timeout)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 563, in error
result = self._call_chain(*args)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 543, in _open
'_open', req)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\urllib\request.py", line 1320, in do_open
r = h.getresponse()
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\http\client.py", line 1336, in getresponse
response.begin()
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\http\client.py", line 306, in begin
version, status, reason = self._read_status()
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\http\client.py", line 267, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "c:\users\acer\appdata\local\programs\python\python37-32\lib\ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./src/init.py", line 7, in
if check_internet() is True:
File "C:\Users\Acer\Downloads\Compressed\reddit-karma-farming-bot-master\src\utils.py", line 43, in check_internet
log.error(ex.message)
AttributeError: 'timeout' object has no attribute 'message'
exiting...
Press any key to continue . . .

Certificate verify failed

22:52:21 REDDIT CONNFIG: { "reddit_comment_chance": 0.005, "reddit_crosspost_enabled": true, "reddit_low_score_threshold": 0, "reddit_post_chance": 0.005, "reddit_remove_low_scores": 0.002, "reddit_reply_to_comment": 0.002, "reddit_shadowban_check": 0.002, "reddit_sleep_schedule": [ 2, 4 ], "reddit_sub_list": [] } 22:52:26 COBE CONFIG: { "cobe_base_dir": "/Users/rajkumarsamra/Downloads/reddit-karma-farming-bot-master/src/bots/reddit/actions/comments", "cobe_db_dir": "/Users/rajkumarsamra/Downloads/reddit-karma-farming-bot-master/src/bots/reddit/actions/comments/brains", "cobe_main_db": "/Users/rajkumarsamra/Downloads/reddit-karma-farming-bot-master/src/bots/reddit/actions/comments/brains/brain.db", "cobe_max_db_size": "1000mb", "cobe_min_db_size": "100mb" } 22:52:26 using schedules: [((10, 0), (14, 0)), ((18, 0), (22, 0))] 22:52:27 <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)>

docker build

The line of code;
docker build -t=com.mrpowerscripts/mrps/reddit-karma-bot
Does not work

[Suggestion] Add learning pause

I as a user of this bot, I would like it to add some way for us users to pause the learning of the bot, he most of the time, he keeps learning

error response from daemon

I get the following error when I try to run the docker command:

error response from ademon: invalid mount config for type "bind": bind source path does not exist: /root/src

am having this issue

self.username = self.rapi.user.me().name
AttributeError: 'NoneType' object has no attribute 'name'

what to do

Installing virtualenv failed

Got the following error, while doing sudo ./run_linux.sh:

Collecting virtualenv
Downloading https://files.pythonhosted.org/packages/9b/67/f28095ba538be54fc48ec7774d5778a7246972cf8c701430ec0c96bf0860/virtualenv-20.0.20-py2.py3-none-any.whl (4.7MB)
100% |████████████████████████████████| 4.7MB 405kB/s
Collecting distlib<1,>=0.3.0 (from virtualenv)
Downloading https://files.pythonhosted.org/packages/7d/29/694a3a4d7c0e1aef76092e9167fbe372e0f7da055f5dcf4e1313ec21d96a/distlib-0.3.0.zip (571kB)
100% |████████████████████████████████| 573kB 2.3MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'setuptools'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n2bhpdpz/distlib/
Installing virtualenv failed

Can't post properly on AskReddit.

When posting on r/AskReddit the bot adds stuff in the text field as well which is against the rules of the subreddit. Happens 3/5 times statistically. As a result the post automatically gets pulled down. Would love to have this issue fixed as that subreddit is a probable gold mine.

reddit.py is giving http 503 error

Last year PRAW changed and it cannot search posts (submissions) on Reddit. So it is giving an error as the title says.

submissions = list(api.subreddit('random').submissions(
        *submission_timespan()))

Can you update this lines to make it work?

JSON encoding problems.

The bot is crashing when calling the method set_user_info() from db.py

Traceback (most recent call last):
  File "./src/run.py", line 9, in <module>
    init.init()
  File "/home/karma-farm-reddit/src/init.py", line 63, in init
    set_user_info()
  File "/home/karma-farm-reddit/src/db.py", line 41, in set_user_info
    db_config.upsert({"config": "user", "value": j}, Config.config == "user")
  File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 393, in upsert
    updated_docs = self.update(document, cond)
  File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 358, in update
    self._update_table(updater)
  File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 605, in _update_table
    tables = self._storage.read()
  File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/storages.py", line 120, in read
    return json.load(self._handle)
  File "/usr/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 22397 (char 22396)

I think the error comes from me not being able to decode it can't decode the variable j, that is a dictionary.
It's expecting part of it to be enclosed in double quotes.
The dictionary j is all in single quotes, it looks like this.

[...]'pref_clickgadget': 5, 'created': 1546632362.0, 'gold_creddits': 0, 'created_utc': 1546603562.0, 'has_ios_subscription': False, 'pref_show_twitter': False, 'in_beta': False, 'comment_karma': 5281[...]

What is causing that and how do I solve it? It is running on a Debian GNU/Linux 10 Release 10 server. I ran the bot using the run_linux.sh file.

Error when deploying on Heroku

I get the following error when I deploy on Heroku.
Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command Heroku logs --tail

Targeting specific subreddits

It would be great if you could target specific categories of subreddits so the bot can seem to have a more natural personality. example would be if you could choose 10 esports and sport related subreddits and 5 food related subreddits. Then the bot would only comment in these particular subs.

Bot Unable To Submit Posts

The bot only does replies, doesn’t post anything on Heroku. And is there any way to change the credentials on heroku?

Sentiment analysis library?

Check to see if there's an easy way to add sentiment analysis to the bot. This would be ti discard comments that could generate downvotes. Since bot responses aren't contextually aware having it learn to say "fuck you" wouldn't be beneficial. In some contexts that comment could generate significant upvotes, which would trigger the bot to learn it. But the bot may use it out of context causing it to get banned or downvoted. It's safer to identify them and ignore them altogether.

[suggestion] limit karma

i was suggest this 6 months ago on discord. but i want to write there too. can u limit farming? like if i want to stop at 15k.

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.