Issues with a Reddit upvote/downvote bot I wrote

You don't need private proxies OR old accounts at all. My bot is specifically built to work with shitty proxies and virgin accounts. I have had no issues and it works flawlessly. I might know what your issue is but maybe not. PM me for it though.
 
@Bommie

I'm really interested, but I don't think I can PM you because I don't have 50 posts. I can still reply to PMs though.
 
Are you looking at the headers and responses of the payloads? I'm unsure if parameter order matters, but with Python requests, you can order the headers and payload bodies.

I personally love using Fiddler in Windows to capture all the traffic and analyze it. Also, are you using sticky proxies?

For basic proxies, rotating proxies are for sessionless scraping.

Sticky proxies are for session based actions.
 
Last edited:
Are you looking at the headers and responses of the payloads? I'm unsure if parameter order matters, but with Python requests, you can order the headers and payload bodies.

I personally love using Fiddler in Windows to capture all the traffic and analyze it. Also, are you using sticky proxies?

For basic proxies, rotating proxies are for sessionless scraping.

Sticky proxies are for session based actions.

Hey Jack. I don't check the headers and responses, mainly because the library I'm using (selenium in Python) handles that for me.

I do use sticky proxies and not rotating proxies because I'm going for automation, not scraping.
 
Hey Jack. I don't check the headers and responses, mainly because the library I'm using (selenium in Python) handles that for me.

I do use sticky proxies and not rotating proxies because I'm going for automation, not scraping.
Hmmm, are you disabling Javascript? It is far easier to profile and fingerprint a bot when all the JS API data gives intimate details about its operating environment.

What GermanBotMafia said helps avoid this issue, as requests don't have JS enabled by default. Reddit isn't a site that uses JS rendering.
 
use fiddler find out what respond of upvote you will understand what happened
 
Eureka! Got my votes to stick, but I can't be 100% certain that my final change fixed it, but it's most likely the reason. I was being pretty stupid, haha.

I think the reason my votes weren't sticking is because when I navigated to the thread comments section to either vote on the thread or comments in the thread, I would do so by fetching the the comments page via the driver.

Code:
    def visit(self, url: str) -> None:
        if (self.driver.current_url != url):
            self.driver.get(url)
            self.long()

I then implemented a new method of reaching the comments: I found the comment's button element under the thread thumbnail and had my driver click that.

Code:
            # blah blah blah
            comments_button = self.get_element("//div[@id='siteTable']//div[@id='thing_t3_{}']//li[@class='first']", (thread_id, ))
            self.click_element(comments_button)
            # blah blah blah

I believe that clicking on the comment button sets some flag on reddit's end that enables voting to stick. If you inspect the comment button element, you'll also see that it triggers some js events probably related to enabling voting. It could also, more likely, simply be that navigating to the comments page via link provides a referrer, while fetching via driver gets doesn't.

So that's probably the reason, but there are some additinal other things I did which, if you plan to write or are currently writing a scraping or automating application (not just for reddit) via selenium, you might want to do/implement/know.

1) I switched from Firefox to Chromium. THIS IS REALLY IMPORTANT. When using selenium with Firefox, Firefox imbeds some flag in the html(?). Not entirely sure, but it allows advanced detection algorithms, such as those by distill networks, to flag your browser. Chrome or go home, I guess.

2) Modified the Chromium driver. Even after using Chrome, you need to modify/recompile the driver. Why? It's because some Javascript in the driver has a certain variable that can be detected, which gives away that you are using selenium. Here is the stackoverflow link that explains this better than I can, AND provides a solution (I can't post the full link yet due to account restrictions): questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver

3) I patched all my webRTC leaks.

and finally

4) I randomized my useragent. In Python, I use the fake_useragent library. I then generate useragents that rougly match the ratios of useragents seen in the wild.


So ya, even using really young accounts (less than a week old) and shared data warehouse proxies, I'm getting my votes to stick.

Again, thanks for all the help, I appreciate it.
 
Eureka! Got my votes to stick, but I can't be 100% certain that my final change fixed it, but it's most likely the reason. I was being pretty stupid, haha.

I think the reason my votes weren't sticking is because when I navigated to the thread comments section to either vote on the thread or comments in the thread, I would do so by fetching the the comments page via the driver.

Code:
    def visit(self, url: str) -> None:
        if (self.driver.current_url != url):
            self.driver.get(url)
            self.long()

I then implemented a new method of reaching the comments: I found the comment's button element under the thread thumbnail and had my driver click that.

Code:
            # blah blah blah
            comments_button = self.get_element("//div[@id='siteTable']//div[@id='thing_t3_{}']//li[@class='first']", (thread_id, ))
            self.click_element(comments_button)
            # blah blah blah

I believe that clicking on the comment button sets some flag on reddit's end that enables voting to stick. If you inspect the comment button element, you'll also see that it triggers some js events probably related to enabling voting. It could also, more likely, simply be that navigating to the comments page via link provides a referrer, while fetching via driver gets doesn't.

So that's probably the reason, but there are some additinal other things I did which, if you plan to write or are currently writing a scraping or automating application (not just for reddit) via selenium, you might want to do/implement/know.

1) I switched from Firefox to Chromium. THIS IS REALLY IMPORTANT. When using selenium with Firefox, Firefox imbeds some flag in the html(?). Not entirely sure, but it allows advanced detection algorithms, such as those by distill networks, to flag your browser. Chrome or go home, I guess.

2) Modified the Chromium driver. Even after using Chrome, you need to modify/recompile the driver. Why? It's because some Javascript in the driver has a certain variable that can be detected, which gives away that you are using selenium. Here is the stackoverflow link that explains this better than I can, AND provides a solution (I can't post the full link yet due to account restrictions): questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver

3) I patched all my webRTC leaks.

and finally

4) I randomized my useragent. In Python, I use the fake_useragent library. I then generate useragents that rougly match the ratios of useragents seen in the wild.


So ya, even using really young accounts (less than a week old) and shared data warehouse proxies, I'm getting my votes to stick.

Again, thanks for all the help, I appreciate it.

Awesome man, glad to see you got it working! The shared knowledge is great too.

I'd still recommend inspecting the traffic, because you'll see the exact traffic that gets sent when you are clicking on page elements, and you can mimic the exact path.

If you don't mind me asking, this looks like Python, so are you doing the whole thing with it Chromium Web Driver and all?

That seems expensive from a memory standpoint for each thread running, unless this is a small project voting on just a handful of things.
 
I'd still recommend inspecting the traffic, because you'll see the exact traffic that gets sent when you are clicking on page elements, and you can mimic the exact path.

+1 from me regarding the inspection of the traffic with a MITM proxy of your choice (Fiddler, Charles, ...). It's way easier than WireShark.
 
@JackTheRooster

My project at the moment is running through chrome web driver, and you're right, it is memory extensive, but I think that I will still be able to get 50-100 concurrent processes without further optimization just based on CPU and RAM usage running 10-15 simultaneous processes.
I do plan to optimize though, because the end goal is to support hundreds of users at the same time.

@GermanBotMafia

I do plan to look at network traffic, patch and leaks, and optimize further when I get the chance. Making this as efficient as possible is important to me, but I'm still working on some other parts of the program and will have to get to optimizing near the end.
 
@JackTheRooster

My project at the moment is running through chrome web driver, and you're right, it is memory extensive, but I think that I will still be able to get 50-100 concurrent processes without further optimization just based on CPU and RAM usage running 10-15 simultaneous processes.
I do plan to optimize though, because the end goal is to support hundreds of users at the same time.

@GermanBotMafia

I do plan to look at network traffic, patch and leaks, and optimize further when I get the chance. Making this as efficient as possible is important to me, but I'm still working on some other parts of the program and will have to get to optimizing near the end.
You're doing some interesting things, so I hope you don't mind if I check back on your progress :) I've been mired in issues with my custom built tool, where the votes stick, but the accounts die after about 48 hours. Hell, they even die if they do no activity. I'm interested in doing an info exchange via PM with anyone, as well. Mine differs from yours, in that I'm only using requests, so it can run on damn near a 10 year old potato.
 
You don't need private proxies OR old accounts at all. My bot is specifically built to work with shitty proxies and virgin accounts. I have had no issues and it works flawlessly. I might know what your issue is but maybe not. PM me for it though.
Bommie, for your bot, do you use browser automation, http requests, or a combination of both? It seems more and more sites fingerprint via Javascript, and emulating a browser seems to be the best way of getting through.
 
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.
What do you do about the fingerprint data that you have to send them? The Javascript tattles on you, and they expect this data.
 
@JackTheRooster

I'm more than happy to colloborate so we can both reach our goals. I did read about the problem you're having, and I think I saw it on another thread as well. I'm actually not having that problem, and all my accounts are alive and well.

Maybe you can message me and we can discuss the differences in our approaches, maybe you'll find out the issues in that manner?
 
Eureka! Got my votes to stick, but I can't be 100% certain that my final change fixed it, but it's most likely the reason. I was being pretty stupid, haha.

I think the reason my votes weren't sticking is because when I navigated to the thread comments section to either vote on the thread or comments in the thread, I would do so by fetching the the comments page via the driver.

Code:
    def visit(self, url: str) -> None:
        if (self.driver.current_url != url):
            self.driver.get(url)
            self.long()

I then implemented a new method of reaching the comments: I found the comment's button element under the thread thumbnail and had my driver click that.

Code:
            # blah blah blah
            comments_button = self.get_element("//div[@id='siteTable']//div[@id='thing_t3_{}']//li[@class='first']", (thread_id, ))
            self.click_element(comments_button)
            # blah blah blah

I believe that clicking on the comment button sets some flag on reddit's end that enables voting to stick. If you inspect the comment button element, you'll also see that it triggers some js events probably related to enabling voting. It could also, more likely, simply be that navigating to the comments page via link provides a referrer, while fetching via driver gets doesn't.

So that's probably the reason, but there are some additinal other things I did which, if you plan to write or are currently writing a scraping or automating application (not just for reddit) via selenium, you might want to do/implement/know.

1) I switched from Firefox to Chromium. THIS IS REALLY IMPORTANT. When using selenium with Firefox, Firefox imbeds some flag in the html(?). Not entirely sure, but it allows advanced detection algorithms, such as those by distill networks, to flag your browser. Chrome or go home, I guess.

2) Modified the Chromium driver. Even after using Chrome, you need to modify/recompile the driver. Why? It's because some Javascript in the driver has a certain variable that can be detected, which gives away that you are using selenium. Here is the stackoverflow link that explains this better than I can, AND provides a solution (I can't post the full link yet due to account restrictions): questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver

3) I patched all my webRTC leaks.

and finally

4) I randomized my useragent. In Python, I use the fake_useragent library. I then generate useragents that rougly match the ratios of useragents seen in the wild.


So ya, even using really young accounts (less than a week old) and shared data warehouse proxies, I'm getting my votes to stick.

Again, thanks for all the help, I appreciate it.

This is superhelpfull to me.

- When you modified your chromedriver, what did you replace ? only "cdc_" or more ?

- How did you patch webRTC leaks ? is it a chromeOptions to add ?

Could you share what options are you using to launch the driver ? I use atm :

"--disable-plugins", "--incognito", "--window-size=1920,1080", "--disable-extensions", "--disable-plugins-discovery"

Thanks
 
@andyskipo

You can just message me, I don't think I can send PMs yet. I haven't found the option on anyones profile to Start a Conversation/Private Message. Maybe I'm looking in the wrong place?

@Owmince

I completely modified the chrome driver variable. I don't remember what I set it too, but you want to completely get rid of the "cdc", they use regex to detect the presence of "cdc" in the string.
For webRTC leaks, you need to set chrome preferences, not JUST options.

Code:
preferences = {
    "webrtc.ip_handling_policy" : "disable_non_proxied_udp",
    "webrtc.multiple_routes_enabled": False,
    "webrtc.nonproxied_udp_enabled" : False
}
chrome_options.add_experimental_option("prefs", preferences)

These should block most if not all webRTC vulnerabilities.

I use those options, plus some options for routing requests through a proxy server (--proxy-server=XYZ).

Keep in touch, message me or something, I'm actually struggling again, because my post votes stick, but my comment votes don't. Both used to work, and I'm not quite sure what's happened. I don't think it's the code, I haven't touched the comment voting code.
 
This is superhelpfull to me.

- When you modified your chromedriver, what did you replace ? only "cdc_" or more ?

- How did you patch webRTC leaks ? is it a chromeOptions to add ?

Could you share what options are you using to launch the driver ? I use atm :

"--disable-plugins", "--incognito", "--window-size=1920,1080", "--disable-extensions", "--disable-plugins-discovery"

Thanks
Btw randomize your window sizing to a sane range. That's often a first line of defense against bot fingerprinting.
 
@V0yt3k can I send you a message on Skype ?
I'm also a newbie and do not have the option to send you a PM
 
@V0yt3k Thanks, i will keep you updated about my tests.

I found a rotating proxy provider that i like, i will try for a few days and see how it goes

You can add me on discord if you want : Owmince#4813
 
Back
Top