Closed AndresQuiVal closed 2 years ago
Hello there, I execute the exact same sample code as the given in here and yet I have the following error:
Hello @AndresQuiVal, cloudflare was updated a couple of days ago. I haven't checked the changes yet.
Cool @rastvl , are you going to fix it? Thanks!
Cool @rastvl , are you going to fix it? Thanks!
@AndresQuiVal There was a problem with the 2captcha extension code. Fixed. I also noticed that another browser test has been added to the cloudflare page. Instead of hcaptcha, sometimes you have to click on an item. I may have to deal with this later.
Cool @rastvl , are you going to fix it? Thanks!
@AndresQuiVal There was a problem with the 2captcha extension code. Fixed. I also noticed that another browser test has been added to the cloudflare page. Instead of hcaptcha, sometimes you have to click on an item. I may have to deal with this later.
@rastvl Cool, seems that yet is not working, but we'll wait for the update of the package to be released!
Cool, seems that yet is not working, but we'll wait for the update of the package to be released!
@AndresQuiVal At which site does the timeout occur? I checked on temp-mail.org and got valid cookies
It happens in https://www.innvictus.com/
Get Outlook for iOShttps://aka.ms/o0ukef
From: rastvl @.> Sent: Tuesday, November 1, 2022 2:49:38 PM To: rastvl/cloudflare-cookies-generator @.> Cc: AndresQuiVal @.>; Mention @.> Subject: Re: [rastvl/cloudflare-cookies-generator] Timeout error (Issue #1)
Cool, seems that yet is not working, but we'll wait for the update of the package to be released!
@AndresQuiValhttps://github.com/AndresQuiVal At which site does the timeout occur? I checked on temp-mail.org and got valid cookies
— Reply to this email directly, view it on GitHubhttps://github.com/rastvl/cloudflare-cookies-generator/issues/1#issuecomment-1299126564, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMU3AQ5MOELGCCTZVCHLMUDWGF66FANCNFSM6AAAAAARUL55VM. You are receiving this because you were mentioned.Message ID: @.***>
It happens in https://www.innvictus.com/
@AndresQuiVal
I don't get cloudflare on this page. Most likely the problem is that the browser does not get the cloudflare challenge page too.
You can see what happens in the browser by changing the headless
property in the browserOptions
object in constants.js file to false
Cool i will try then, but also, i tried with the webpage that was used on the gfi attached to this issue, and yet didnt work, and also tried with medium.com which seems to use cloudflare; neither of them worked, is that normal??
Get Outlook for iOShttps://aka.ms/o0ukef
From: rastvl @.> Sent: Tuesday, November 1, 2022 3:01:36 PM To: rastvl/cloudflare-cookies-generator @.> Cc: AndresQuiVal @.>; Mention @.> Subject: Re: [rastvl/cloudflare-cookies-generator] Timeout error (Issue #1)
It happens in https://www.innvictus.com/
@AndresQuiValhttps://github.com/AndresQuiVal I don't get cloudflare on this page. Most likely the problem is that the browser does not get to the cloudflare challenge page too. You can see what happens in the browser by changing the headless property in the browserOptions object in constants.js file to false
— Reply to this email directly, view it on GitHubhttps://github.com/rastvl/cloudflare-cookies-generator/issues/1#issuecomment-1299152905, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMU3AQ45KDVPTVCKDP4KB2TWGGALBANCNFSM6AAAAAARUL55VM. You are receiving this because you were mentioned.Message ID: @.***>
Cool i will try then, but also, i tried with the webpage that was used on the gfi attached to this issue, and yet didnt work, and also tried with medium.com which seems to use cloudflare; neither of them worked, is that normal??
@AndresQuiVal
Much depends on your proxies. If the cloudflare challenge doesn't show up on your proxies, then you can work with the site without pre-installing the cookies, and you don't need this tool.
I just tested on https://www.zoominfo.com/c/Central-Florida-Athletics/363146903
, https://temp-mail.org/
, https://www.dekudeals.com/login
with "bad" ip where the cloudflare challenge triggered and it works fine.
(Of course, I first installed the sitekey and rucaptcha api key in constants.js
)
@rastvl I tried with those urls:
https://temp-mail.org/
https://www.dekudeals.com/login
but none of them worked, still giving timeout error; but for this url:https://www.zoominfo.com/c/Central-Florida-Athletics/363146903
it throw this error:
though was based on the captcha struggle the library has, yet don't know
Also, im not using proxies for all the sites im using the library with, so, still kind of trying to figure out why doesn't work :(
I tried with those urls:
https://temp-mail.org/
https://www.dekudeals.com/login
Have you enabled browser display in the constants.js
file? I think that you from your ip just don't trigger the cloudflare challenge.
throw this error:
This happens because you have not set the values of hcaptcha_sitekey
and capmonser_apikey
variables in the constants.js
file
@rastvl Cool, let me try then, how can I enable browser display? the current content of the browserOptions
const is like this:
const browserOptions = {
ignoreHTTPSErrors: true,
args: [
'--lang=en-US,en;q=0.9',
'--disable-sync',
'--disable-features=IsolateOrigins,site-per-process',
],
defaultViewport: {
width: 1920,
height: 1080,
},
headless: true //,
// proxy: { server: 'per-context' }
};
NOTE that proxy is commented
Cool, let me try then, how can I enable browser display?
headless: false
@rastvl Still the same error after changing [that value](headless: false)
I tried with both urls and neither of those worked, still timeout error
{error: 'Failed to get cookies: timeout'}
@AndresQuiVal Sorry, I'm not quite sure what you're doing.
headless: false
is so you can see if cloudflare triggers on your site.
example
@AndresQuiVal with hcaptcha
@AndresQuiVal with hcaptcha
Sorry, I cannot se the video, seems to be unavailable, neither of the videos per se
@rastvl After enabling the headless: false option, i've noticed that it opens the browser, but only keeps refreshing on the same site, i.e, refreshes on this part:
is the webpage that it opened correct? or it should open other cloudflare site, such as the challenge?
@AndresQuiVal are you using the latest version? This should work - example
Now it works for dekudeals.com/login
So then i realized something, the system can only solve the challenge and get the cookies whenever it appears on some resource of the webpage something like this:
right? does there exists other way to get the cookies without having that page facing in?
@AndresQuiVal
So then i realized something, the system can only solve the challenge and get the cookies whenever it appears on some resource of the webpage something like this
Yes, let's say I'm working with some web page through POST/GET requests. Because of cloudflare I get a 503 response and need to solve cloudlfare challange. In this case, I send a request to the server, the server should give cookies, and then I can continue to work with my web page using the received cookies. (The system should run in headless mode to consume less RAM)
does there exists other way to get the cookies without having that page facing in?
I don't really understand in what case it might be necessary. If the cloudflare page does not appear, I usually work with the site without any problems
Cool cool, now understand it, for other case scenario, I mean like cases in which the webpage throws some 429 status code, still that works? @rastvl
Cool cool, now understand it, for other case scenario, I mean like cases in which the webpage throws some 429 status code, still that works? @rastvl
@AndresQuiVal 429 is "too many requests" error. I guess, u need to use more proxies or increase the delay between requests)
Thats perfect, now the main problem is solved, yet i tried to make a request using python code and didnt worked, and the payload (python code) is like this:
def make_cookies():
payload = {
"url": "https://www.dekudeals.com/login",
"userAgent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 100/104.0.0.0 Safari/537.36",
"hcaptcha": ""
}
res = requests.post("http://localhost:3000/createTask", data=payload)
res.raise_for_status()
print(res.content)
Why is this happening?
Why is this happening?
@AndresQuiVal I don't use python, so I don't really understand what's wrong here. You need to figure out why you are sending the wrong request.
I think the problem is in the res = requests.post("http://localhost:3000/createTask", data=payload)
line. Maybe you should write res = requests.post("http://localhost:3000/createTask", json=payload)
@rastvl Solved, that worked, thanks!
Hello @rastvl seems that the library is again not working, i tested for dekudeals.com/login
and none of them worked, still seems to be the timeout error, does it work for you?
Hello @rastvl seems that the library is again not working, i tested for
dekudeals.com/login
and none of them worked, still seems to be the timeout error, does it work for you?
It works. Example
@rastvl I just redownloaded the library and execute it, removed the proxy use and set headless : false
in constants.js
and yet doesnt work, is there something wrong with the configuration?
@AndresQuiVal Alas, I don't know why it might not work for you. I also re-downloaded the files from the repository and got the cookies without any problems. Try looking at your browser that uses playwright. I use chromium 105
@rastvl just redownloaded the code again and not working, im using the sample script again and the chromium version is 107.0.5304
@rastvl What version of playwright
are you using, seems that I'm using a latest version since your chromium version is different, or you specified an executablePath
for chromium?
UPDATE @rastvl
I tried using chromium
version 105.0.5177.0
and doesnt work either, seems to be a package issue or something related to the source code, im still reading it to figure out but havent got to anything.
Seems that cloning the project on MacOS, zipping the project and moving it to Windows worked, super strange even though where the same codebases, seems that those edge cases should be added to README.md in order for devs to consider it since we tried on 2 windows computers and none of them worked @rastvl
Hello there, I execute the exact same sample code as the given in here and yet I have the following error:
{error: 'Failed to get cookies: timeout'}
Also changed the URL to other cloudflare page based, and exactly the same error, does this solution still works?? @rastvl
Thanks