Issues with a Reddit upvote/downvote bot I wrote

V0yt3k

Newbie
Joined
Feb 3, 2019
Messages
17
Reaction score
10
Hey all,

I've written my own reddit upvote/downvote bot, but I'm having trouble getting it off the ground, mainly because my votes don't seem to register and some of my accounts are getting banned. When I say votes don't register, logging into accounts reveals the vote actually occurred, but the actual vote count externally doesn't budge.

Here's how it works:
For a target (thread or comment), I select a subset of accounts from all the accounts I have available to upvote/downvote the target. I then generate a custom script (later read by another part of my program) which upvotes or downvotes the target as required, but also mimics natural behavior by browsing and voting on other random subreddits, threads, and comments.

Once this script is completed, I execute this script and other scripts simultaneously in multiple processes. I use selenium to automate user actions and run these scripts headlessly using Xvfb. This is to avoid a headless user agent.

My bot is written completely in Python, with an sqlite3 database that stores targets and submission/comment cache. I do use PRAW, but I use it in a read-only manner, so no votes are sent through PRAW at all. I just use PRAW to update cache and gather some information about the target thread or comment.

Some problems/things I think may be the issue:
1) Each account has unique proxy, but those proxies themselves are shared proxies I bought from a provider. Maybe I should use a dedicated proxy?
2) These accounts are pretty young. I made them all less than a week ago. Most of them don't have a comment block, however, so I can comment quite often. Some accounts got banned though. Maybe I should use older/aged accounts?
3) I'm executing from a Linux machine with Firefox as the application. Maybe I should spoof the user agent to Windows and use some other browsers?

Any tips/help would be greatly appreciated. I'm not just trying to make my bot work, but I'm trying to make it better too, so if you think I'm doing something fundamentally wrong, please let me know.

Thanks so much!
 
It's probably not a proxy issue. It's probably not an issue with the reddit accounts being new. I have used the worst abused proxies in the world and not had an issue getting upvotes to stick and I have used brand new 1 minute old accounts and go them to stick. If the accounts are getting banned, there is a leak which is telling reddit you are a bot. First thing I would try is spoofing the useragent. I am not a programmer so I can't help much more, but it's got to be something about the way reddit sees you (useragent or such) or the way the requests are being made that says I AM A BOT.
 
It's probably not a proxy issue. It's probably not an issue with the reddit accounts being new. I have used the worst abused proxies in the world and not had an issue getting upvotes to stick and I have used brand new 1 minute old accounts and go them to stick. If the accounts are getting banned, there is a leak which is telling reddit you are a bot. First thing I would try is spoofing the useragent. I am not a programmer so I can't help much more, but it's got to be something about the way reddit sees you (useragent or such) or the way the requests are being made that says I AM A BOT.

That's really helpful insight. In this case, I'll continue to run all the accounts I have, and theoretically, they should all get banned.
 
That's really helpful insight. In this case, I'll continue to run all the accounts I have, and theoretically, they should all get banned.

I thought of some things: Are you just using 1 proxy per account? Are you adding time between upvotes or do they upvote at basically the same time? Also, did you make the accounts or did you buy them from someone else? Some reddit account sellers are garbage and the accounts are already known to be bot accounts and will get banned instantly when you log in or sometimes even without logging in they will be banned.
 
I thought of some things: Are you just using 1 proxy per account? Are you adding time between upvotes or do they upvote at basically the same time? Also, did you make the accounts or did you buy them from someone else? Some reddit account sellers are garbage and the accounts are already known to be bot accounts and will get banned instantly when you log in or sometimes even without logging in they will be banned.

I do use 1 proxy per account. But the proxy is a shared proxy used by 2 other people for whatever they use it for. My upvotes don't come all at the same instant. For example, 5 upvotes should be delivered in 10 minutes randomly over the duration, not all during the first minute or the last. Also, I made these accounts. I manually filled out the captchas and verified the emails. I was eventually gonna buy more accounts if my test with a small number of accounts (15 that I have so far) was successful, but it hasn't been.
 
I have a private Reddit bot, I've spent years getting it to where it is.

Some hints - you are leaking that you are botting, keep looking at the packets being sent!

Interesting. I guess I'll have to use wireshark, but I'm not really good at that. Time to learn.
 
If you use Selenium or a build a bot with useragent. For me it worked
 
If you are using selenium then you should modify the gecko driver. If you use unmodified one, websites can detect that you are a bot. Other than that, you should also disable WebRTC so that it doesn't leak your IP.
 
Reddit uses a point-based spam filter. Older accounts help. So do better proxies. You don't have to do everything perfectly; you just have to do enough things to get over a particular anti-spam threshold.
 
Last edited by a moderator:
If you are using selenium then you should modify the gecko driver. If you use unmodified one, websites can detect that you are a bot. Other than that, you should also disable WebRTC so that it doesn't leak your IP.

What sort of modifications? Add-ons etc?
 
Try this with aged reddit account, each account per private proxy (maybe you can try 4G proxy or residental proxy) and you do not need to use xvfb because Chrome and Firefox currently supported headless already
 
If you are using selenium then you should modify the gecko driver. If you use unmodified one, websites can detect that you are a bot. Other than that, you should also disable WebRTC so that it doesn't leak your IP.

Yeah, I looked more into it yesterday and learned that you can detect selenium through some Javascript, but modifying the gecko driver in a certain way circumvents detection.
 
Yeah, I looked more into it yesterday and learned that you can detect selenium through some Javascript, but modifying the gecko driver in a certain way circumvents detection.

Why do you need Selenium/Gecko at all? You could do this with simple HTTPS requests also.
 
Try this with aged reddit account, each account per private proxy (maybe you can try 4G proxy or residental proxy) and you do not need to use xvfb because Chrome and Firefox currently supported headless already

Ya, I'm gonna move from Firefox + Xvfb to headless chrome. At the time, I was unfamiliar with selenium, so it was easier for me to just place the entire process into a headless container, but not only is headless chrome pretty undetectable if you modify the driver and change the user agent, but it is also significantly less expensive. It's probably my next move.
 
Ya, I'm gonna move from Firefox + Xvfb to headless chrome. At the time, I was unfamiliar with selenium, so it was easier for me to just place the entire process into a headless container, but not only is headless chrome pretty undetectable if you modify the driver and change the user agent, but it is also significantly less expensive. It's probably my next move.

I wouldn't do this. Reddit doesn't include any dynamic content (like Flash) which requires any browser based emulation, no matter if headless or not.

You can do upvotes and downvotes with simple HTTPS request, like with libcurl. This will make everything harder to detect as a bot.
 
Reddit uses a point-based spam filter. Older accounts help. So do better proxies. You don't have to do everything perfectly; you just have to do enough things to get over a particular anti-spam threshold.

That was really helpful. Thanks.

@GermanBotMafia

I'm not entirely sure you can - some actions on reddit seem to require Javascript. Even if they don't, from a development standpoint, is it far easier for me to use an existing library with extensive documentation.
 
Last edited by a moderator:
Back
Top