Craiglist

Mark Miller

2Captcha Engineer
Staff member
Hello,

I'm new here. Could someone please help me to bypass ReCaptcha at craiglist?
Hi!
I recommend you to use token method provided by captcha bypassing services like 2captcha: https://2captcha.com/2captcha-api#solving_recaptchav2_new
The main issue on craiglist is that ReCaptcha is initialized only when you click on "reply" button.
The process mainly looks like:
1. Click on "reply".
2. When ReCaptcha appear - click outside ReCaptcha to close the challenge.
3. Find sitekey value and send it to API.
4. Get the token and put it into g-recaptcha-response field.
5. Execute the callback function. As it's an anonymous function on craiglist you can call it this way:
___grecaptcha_cfg.clients[0].ba.l.callback("YOUR_TOKEN");
6. Done.
 

Mark Miller

2Captcha Engineer
Staff member
Hi!
I recommend you to use token method provided by captcha bypassing services like 2captcha: https://2captcha.com/2captcha-api#solving_recaptchav2_new
The main issue on craiglist is that ReCaptcha is initialized only when you click on "reply" button.
The process mainly looks like:
1. Click on "reply".
2. When ReCaptcha appear - click outside ReCaptcha to close the challenge.
3. Find sitekey value and send it to API.
4. Get the token and put it into g-recaptcha-response field.
5. Execute the callback function. As it's an anonymous function on craiglist you can call it this way:
___grecaptcha_cfg.clients[0].ba.l.callback("YOUR_TOKEN");
6. Done.

ReCaptcha is initialized only after clicking on "Reply" button and g-recaptcha-response field is created at this moment.
So you can do something like that with JavaScript:
JavaScript:
document.getElementsByClassName('reply_button')[0].click(); //click on "Reply"

//recaptcha is initialized and a challenge appears

document.elementFromPoint(1, 1).click(); //click outside to close the challenge

document.getElementById('g-recaptcha-response').value="PLACE_THE_TOKEN_HERE"; //put the token into g-recaptcha-response field

___grecaptcha_cfg.clients[0].ba.l.callback("PLACE_THE_TOKEN_HERE"); //execute the callback passing the token as argument
 

gigidur

New member
Thank you for the reply.
I am still stuck at step 3. Find sitekey value
I am clicking Reply and then clicking outside but I see no sitekey in the html source of the page.
Can you detail a bit more please?
 

Mark Miller

2Captcha Engineer
Staff member
Thank you for the reply.
I am still stuck at step 3. Find sitekey value
I am clicking Reply and then clicking outside but I see no sitekey in the html source of the page.
Can you detail a bit more please?
All HTML related to ReCaptcha appears only when you click on "Reply" and at the same time ReCaptcha config object is initialized.
Open javascript console, then click on Reply and type
JavaScript:
___grecaptcha_cfg.clients[0].aa.l.sitekey
then hit Enter - you will get the sitekey.
 

gigidur

New member
Thank you v much, that part worked now.
I am now getting an error when doing document.getElementById('g-recaptcha-response').value="PLACE_THE_TOKEN_HERE";
The error is:
VM104:1 Uncaught TypeError: Cannot set property 'value' of null
at <anonymous>:1:54

Sorry to keep bugging you with questions, I tried a lot to fix myself first but without success
 

Mark Miller

2Captcha Engineer
Staff member
Thank you v much, that part worked now.
I am now getting an error when doing document.getElementById('g-recaptcha-response').value="PLACE_THE_TOKEN_HERE";
The error is:
VM104:1 Uncaught TypeError: Cannot set property 'value' of null
at <anonymous>:1:54

Sorry to keep bugging you with questions, I tried a lot to fix myself first but without success

That happens because 'g-recaptcha-response' element doesn't exist at this moment.
As far as I know it's created at the moment you click on "Reply" and deleted when ReCaptcha verification is finished.

Looks like the best way to deal with Craigslist is to make GET/POST requests without browser simulation.
The process looks like this:
1. Make GET request to the URL of the post.
chicago.craigslist.org/nch/act/d/looking-for-fantasy-football/6653564099.html
2. Make GET request to "Reply" URL: chicago.craigslist.org/reply/chi/act/6653564099
Parse the HTML to find "n" element value.
3. Make POST request to "Reply" URL: chicago.craigslist.org/reply/chi/act/6653564099
providing two fields: "n" (found on previous step) and "g-recaptcha-response" (that you got from API). Also try V3 method to get a token as they can be using V3 at the moment.
4. If you're lucky Craigslist will return you an HTML with contact info.
 
Last edited by a moderator:

gigidur

New member
Has anybody successfully implemented that?
I get that "An error has occurred. Please try again later." at step 4.
Which is the same error I get when browsing Craigslist
 

Petr

Administrator
Staff member
Looks like they increased the minimal value and the chance to get a good token is quite low, about 5-10%.
We're in the research to find a solution at the moment.
 

gigidur

New member
thanks.
Any way to be alerted when a solution is found?

P.S: for the above I don't even get 5-10%, that would still be an ok result, I get around 1-2%
 

gigidur

New member
is their a way to clear/reset your user after it gets flagged by google captcha as low rating?
Changing your IP?
Reinstalling the browser?
How do they tell it's the same user?
From what I can see you can get flagged in mozilla and be ok still in chrome or vice-versa.