dejamatt
Newbie
- Oct 24, 2011
- 24
- 18
I've built much of it, but I need your input for the rest of it.
I need input/suggestions from people that know Reddit far more than me. I've build a bot to do the basic reddit functions: upvote/downvote/comment/join subreddit/follow user. I've got both a browser-based solution and a non-browser based solution. I'm specifically looking for input on the automated side (non-browser based side) and how you've managed to keep your accounts alive. Any info is helpful, I'm trying to roll something out for the users on this forum. Think of this as spec'ing out your own Reddit account management console!
For warming accounts (browser-based)
I built a non-(js/puppeteer/selenium,playwright,cypress) solution. I'm currently only using it to browse and randomly upvote, just to keep activity going on the account. Right now I'm just using it to comment/upvote on particular posts. It's difficult when you don't have the DOM readily available with the automation webkits. But, to survive and not look like a bot, you can't use webkits that are easily detected. And you can't detect my bot because there's nothing additional running on the browser. Also, mouse moving. Webkits literally navigate the DOM with 0 movement, things just get clicked. So, I've done some cool random mouse movements to make it look real (bezier curve stuff).
Automated stuff (non-browser based)
Outside the scope of using Reddit's API directly, here's what I have so far (It's still work in progress):
- Scrape the page with the current cookies (note, these will dynamically change) to obtain the csrf_token which is needed to upvote/downvote/comment/post
- JSON POST to the graphql with the full payload (to not look like a bot)
- Saving most recent cookies to maintain sessions
Accounts are additionally stored with: user-agent, cookies, proxy
Everything is controlled through API calls, so you can easily perform actions quickly and concurrently.
In a perfect world, the non-browser solution would handle everything without ever needing to log back into the browser by just maintaining the login cookie. I have no idea how smart Reddit is in terms of their bot detection algorithm. My browser based account warming solution is doing bezier curves to look real and navigate the DOM, while there's 0 mouse movement in the automated stuff. I'm working on numbers to figure out which solution lasts the longest, so far the browser based solution is working perfectly with no account losses. Obviously the browser based solution takes ages and tons of resources and is subject to things going wrong, as ANY browser solution does, however it looks like a real person. While the automated stuff is really exciting, because API post specs just work...however, I feel like Reddit is very aware of this and has a way to detect it. Aside from properly formatting the payload, there's not much else that I can figure out. It's not like you can inject mouse movements into the page when you aren't dealing with a rendered page.
My question to you is what am I missing, what am I doing wrong and what needs to be changed. Any feedback is good feedback. I want to make something that we can all use!
I need input/suggestions from people that know Reddit far more than me. I've build a bot to do the basic reddit functions: upvote/downvote/comment/join subreddit/follow user. I've got both a browser-based solution and a non-browser based solution. I'm specifically looking for input on the automated side (non-browser based side) and how you've managed to keep your accounts alive. Any info is helpful, I'm trying to roll something out for the users on this forum. Think of this as spec'ing out your own Reddit account management console!
For warming accounts (browser-based)
I built a non-(js/puppeteer/selenium,playwright,cypress) solution. I'm currently only using it to browse and randomly upvote, just to keep activity going on the account. Right now I'm just using it to comment/upvote on particular posts. It's difficult when you don't have the DOM readily available with the automation webkits. But, to survive and not look like a bot, you can't use webkits that are easily detected. And you can't detect my bot because there's nothing additional running on the browser. Also, mouse moving. Webkits literally navigate the DOM with 0 movement, things just get clicked. So, I've done some cool random mouse movements to make it look real (bezier curve stuff).
Automated stuff (non-browser based)
Outside the scope of using Reddit's API directly, here's what I have so far (It's still work in progress):
- Scrape the page with the current cookies (note, these will dynamically change) to obtain the csrf_token which is needed to upvote/downvote/comment/post
- JSON POST to the graphql with the full payload (to not look like a bot)
- Saving most recent cookies to maintain sessions
Accounts are additionally stored with: user-agent, cookies, proxy
Everything is controlled through API calls, so you can easily perform actions quickly and concurrently.
In a perfect world, the non-browser solution would handle everything without ever needing to log back into the browser by just maintaining the login cookie. I have no idea how smart Reddit is in terms of their bot detection algorithm. My browser based account warming solution is doing bezier curves to look real and navigate the DOM, while there's 0 mouse movement in the automated stuff. I'm working on numbers to figure out which solution lasts the longest, so far the browser based solution is working perfectly with no account losses. Obviously the browser based solution takes ages and tons of resources and is subject to things going wrong, as ANY browser solution does, however it looks like a real person. While the automated stuff is really exciting, because API post specs just work...however, I feel like Reddit is very aware of this and has a way to detect it. Aside from properly formatting the payload, there's not much else that I can figure out. It's not like you can inject mouse movements into the page when you aren't dealing with a rendered page.
My question to you is what am I missing, what am I doing wrong and what needs to be changed. Any feedback is good feedback. I want to make something that we can all use!