Open Mouad-scriptz opened 1 year ago
I'm a little confused about your issue
If you propose to use pure requests instead of selenium, it is impossible because of reddit protection.
I know this might sound like a lot, but Reddit's security measures are quite weak. They only check headers, and if you're using Chrome with TLS, they also inspect cookies and a hidden csrf_token on the page's html (/register). The most challenging part is solving the reCAPTCHA. nothing other then that
I would say just give it a try.
Also im not hating or anything your project is good but using requests would make it much faster and efficient.
The most challenging part is solving the reCAPTCHA. nothing other then that
That's exactly what I'm talking about
First of all, in order to invoke captcha at all, you can't just make a request to some URL. That query is generated by a ton of JS loaded by google, which needs to be interpreted, not parsed.
Second, the same applies to the captcha page itself. At least I haven't found any opensource solution for solving captchas this way.
So even if it is possible to do it, I won't be able to do it, I've already tried in other projects
You could just solve the recaptcha alone and get the captcha key that would be faster
I have made accounts creator completely using HTTPx lib but the accounts get suspended quickly
@ZakariaMQ How did you do it? Let me guess, just by skipping the captcha solving step? Because if so, it's still unclear how to implement registration only on http requests
yeah, I did it without skipping the captcha. It got solved using the 2Captcha service I used the post request to sign up and verify email all using httpx but the accounts got banned in a matter of hours
now I just need to figure out why accounts get suspended even if all headers are correct and so on
yeah, I did it without skipping the captcha. It got solved using the 2Captcha service I used the post request to sign up and verify email all using httpx but the accounts got banned in a matter of hours
- I did this on the new Reddit
now I just need to figure out why accounts get suspended even if all headers are correct and so on
httpx is detected
I tried both httpx and requests but same results
I have created this account generator using only python requests, I needed to use captcha solving servuce
def solve_recaptcha(site_key, page_url):
# Submit the reCAPTCHA task to 2Captcha
response = requests.post(
'http://2captcha.com/in.php',
data={
'key': API_KEY,
'method': 'userrecaptcha',
'googlekey': site_key,
'pageurl': page_url,
'json': 1
}
)
# Parse the API response
response_data = response.json()
if response_data['status'] == 1:
task_id = response_data['request']
# Poll for the solution
while True:
solution_response = requests.get(
'http://2captcha.com/res.php',
params={
'key': API_KEY,
'action': 'get',
'id': task_id,
'json': 1
}
)
solution_data = solution_response.json()
if solution_data['status'] == 1:
return solution_data['request']
elif solution_data['status'] == 0:
if solution_data['request'] == 'CAPCHA_NOT_READY':
# Wait for a few seconds before polling again
time.sleep(3)
else:
raise Exception('Error solving reCAPTCHA: ' + solution_data['request'])
else:
raise Exception('Error submitting reCAPTCHA task: ' + response_data['request'])
this is just a captcha solver which I made in 20 lines of code the important thing is to make accounts live and not get banned after a few hours
use requests