MrPowerScripts / reddit-karma-farming-bot

"Is karma really that important to you? Damn bro, you need a life" - YouTube Comment
https://mrpowerscripts.com
MIT License
299 stars 118 forks source link

bot can't connect to pushshift.io #225

Open britl1 opened 1 year ago

britl1 commented 1 year ago

Following error on run. I was previously able to run this bot fine months ago. I just rebuilt it and ran it. Went through configuration fine, bot errors out trying to connect to pushshift.io. I'm not sure what the use of pushshift is in the bot but maybe an API key changed or something?: Edit: just found this, and it looks like the cause: https://www.reddit.com/r/modnews/comments/134tjpe/reddit_data_api_update_changes_to_pushshift_access/

Please fix using a different API @MrPowerScripts I like the bot and had great success with it in the past.

root@debian:~# cd reddit-karma-farming-bot/
root@debian:~/reddit-karma-farming-bot# ls
deps  Dockerfile  docs  info.log  LICENSE  Pipfile  Pipfile.lock  README.md  run_linux.log  run_linux.sh  run_windows.bat  src
root@debian:~/reddit-karma-farming-bot# ./run_linux.sh 
18/05/2023 13:52:52
system is Linux
Trying to run the bot
Running without menu
Loading .env environment variables...
info loggin
13:52:54 config root: /root/reddit-karma-farming-bot/src/config
13:52:54 repo root: /root/reddit-karma-farming-bot
13:52:54 src root: /root/reddit-karma-farming-bot/src
13:52:54 loading bot_reddit_client_id from envar. Value: z9IFX_QNFVwwfCyQfbYrCw
13:52:54 loading bot_reddit_client_secret from envar. Value: zrJDqQwWXyFaWtxpuhQJ1XcRCWfcwg
13:52:54 loading bot_reddit_username from envar. Value: mike-who
13:52:54 loading bot_reddit_password from envar. Value: pX4(6!wmZmaEFu*
13:52:54 REDDIT AUTH CONFIG:
 {
  "reddit_client_id": "z9IFX_QNFVwwfCyQfbYrCw",
  "reddit_client_secret": "zrJDqQwWXyFaWtxpuhQJ1XcRCWfcwg",
  "reddit_password": "pX4(6!wmZmaEFu*",
  "reddit_username": "mike-who"
}
13:52:54 REDDIT CONNFIG:
 {
  "reddit_comment_chance": 0.005,
  "reddit_comment_karma_limit": null,
  "reddit_crosspost_enabled": false,
  "reddit_karma_limit_check": 0.002,
  "reddit_low_score_threshold": 0,
  "reddit_post_chance": 0.005,
  "reddit_post_karma_limit": null,
  "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": []
}
/root/reddit-karma-farming-bot/.venv/lib/python3.9/site-packages/psaw/PushshiftAPI.py:192: UserWarning: Got non 200 code 404
  warnings.warn("Got non 200 code %s" % response.status_code)
/root/reddit-karma-farming-bot/.venv/lib/python3.9/site-packages/psaw/PushshiftAPI.py:180: UserWarning: Unable to connect to pushshift.io. Retrying after backoff.
  warnings.warn("Unable to connect to pushshift.io. Retrying after backoff.")
Traceback (most recent call last):
  File "/root/reddit-karma-farming-bot/./src/init.py", line 6, in <module>
    import bot
  File "/root/reddit-karma-farming-bot/src/bot.py", line 3, in <module>
    from bots.reddit import RedditBot
  File "/root/reddit-karma-farming-bot/src/bots/reddit/__init__.py", line 3, in <module>
    from .bot import RedditBot
  File "/root/reddit-karma-farming-bot/src/bots/reddit/bot.py", line 3, in <module>
    from apis import reddit_api
  File "/root/reddit-karma-farming-bot/src/apis/__init__.py", line 9, in <module>
    pushshift_api = PS()
  File "/root/reddit-karma-farming-bot/src/apis/pushshift.py", line 13, in __init__
    self.api = PushshiftAPI()
  File "/root/reddit-karma-farming-bot/.venv/lib/python3.9/site-packages/psaw/PushshiftAPI.py", line 326, in __init__
    super().__init__(*args, **kwargs)
  File "/root/reddit-karma-farming-bot/.venv/lib/python3.9/site-packages/psaw/PushshiftAPI.py", line 94, in __init__
    response = self._get(self.base_url.format(endpoint='meta'))
  File "/root/reddit-karma-farming-bot/.venv/lib/python3.9/site-packages/psaw/PushshiftAPI.py", line 194, in _get
    raise Exception("Unable to connect to pushshift.io. Max retries exceeded.")
Exception: Unable to connect to pushshift.io. Max retries exceeded.
root@debian:~/reddit-karma-farming-bot# 
britl1 commented 1 year ago

you do know u just leaked your login right

password was changed since then..and it was just a throwaway account i made to run the app on

neonnskye commented 1 year ago

It's a problem with psaw, the wrapper he's using for PushShiftAPI. It's broken and they stopped working on it. Apparently we have to move to pmaw.

Edit: It's not a problem with pmaw or psaw. PushShift API is down because of Reddit's API policy changes.

DavidHlavacek commented 1 year ago

It's a problem with psaw, the wrapper he's using for PushShiftAPI. It's broken and they stopped working on it. Apparently we have to move to pmaw.

Edit: It's not a problem with pmaw or psaw. PushShift API is down because of Reddit's API policy changes.

So what now?