bditt / strawpoll.me-bot Goto Github PK
View Code? Open in Web Editor NEWThis is a program that automates the action of voting on the website Strawpoll.me
License: GNU General Public License v3.0
This is a program that automates the action of voting on the website Strawpoll.me
License: GNU General Public License v3.0
Here's some advice, as i 'noticed' you were new to C#:
This isn't C# specific, but i'd suggest splitting up functions like Strawpoll_Bot::Program::VoteRequest to prevent the over-indentation/nesting as seen in the respective function.
You should be using string interpolation to format strings instead of concating like here.
Eg:
$"http://2captcha.com/in.php?key={captchakey}&method=userrecaptcha&googlekey={sitekey}&invisible=1&pageurl={currenturl}";
I don't have any experience with 2captcha, only anti-captcha, but from the information on 2captchas site, it seems very overpriced (anti-captcha is $1 cheaper per 1000 solves). I've never had any issues with anti-captcha, anyway, and it was definitely solving faster than 30 seconds.
KeyValuePairs can be implicitly converted using { }
, eg.
var formcontent = new FormUrlEncodedContent(new[]
{
{ "security-token", sectoken },
{ authtoken, "" },
{ "g-recaptcha-response", capresponse },
{ "options", option }
});
This is a really 'dirty' function that could be improved a lot (readability). I assume you have coded legacy c before? (You're defining a ton of variables at the top of the function where they are not actually needed. :)
You really should be using a proper html-parser like AgileHtml instead of splitting strings like you are doing here.
Don't do this or this, you're needlessly bottlenecking :)
Don't do this or this, you should be using the using
statement to automatically dispose when objects leave scope.
Eg:
using (var voteclient = new HttpClient(handler))
{
...
}
Use TryParse instead of converting like this.
I'm not quite sure whether or not it's a problem, but your code style might be hard to read when the variable names get longer, as local variables do not have a distinct delimiter. I would suggest snake_case, but you can also just do partial CamelCase, eg. (camelCase) for local variables ๐ (You also are not completely consistent in your naming convention)
Code looks clean besides all of the above. You're not consistent in using var but that's not really an issue ๐
Hi! I found this nice piece of software while searching for a working Strawpoll bot.
I was hoping you could assist me.
First of all, does this still work?
Second, how should I run it on Linux (is it even supported on Linux)?
Thanks!
Hello
My brother
I need a link and explanation for strawpoll
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.