Open Jackhammer010 opened 1 year ago
You could try to open a new window with smth like Ctrl+t and just switch the actions to that window, it normally works for me.
Or another fix is to use another UD chrome driver, I found out that drission works well for bypassing cloudflare
What do you mean by: "another UD chrome driver," I'm only aware of one chromedriver binary, are there other compiled versions?
It's a python library https://pypi.org/project/DrissionPage/1.1.3/, it supposedly works for bypassing Cloudflare but to be 100% honest I haven't tested it, nor I intend on testing it, I personally just reverse the site and use requests
What do you mean by "reverse the site"?
Inspect the site to see how it works to then use that info to interact with the site in a way you want
You could try to open a new window with smth like Ctrl+t and just switch the actions to that window, it normally works for me.
Or another fix is to use another UD chrome driver, I found out that drission works well for bypassing cloudflare
Hello, I bypassed cloudflare as you said and I have everything working but as soon as I use headless mode it stops bypassing cloudflare. Can you advise how to make the code bypass cloudflare by opening another page in headless mode. Thanks
umm, tbh I don't know how you would be able to do that, do you need it to be headless?
您可以尝试使用 smth 打开一个新窗口,例如 Ctrl+t,然后将操作切换到该窗口,它通常对我有用。 或者另一个解决方法是使用另一个 UD chrome 驱动程序,我发现 drission 可以很好地绕过 cloudflare
您好,正如您所说,我绕过了cloudflare,并且一切正常,但是一旦我使用无头模式,它就会停止绕过cloudflare。您能否建议如何通过在无头模式下打开另一个页面来使代码绕过 cloudflare。谢谢
Tips: user-agent
Hello, Really appreciate the work you do here. I'm attempting to scrape this URL: "https://sheriffalerts.com/cap_office_disclaimer.php?office=56622" and I am unable to get through Cloudflare.
This is the code I'm trying to use: import time
import undetected_chromedriver as uc
options = uc.ChromeOptions() options.headless = False options.add_argument('--headless') chrome = uc.Chrome(options=options,version_main=116) chrome.get('https://www.icrimewatch.net/index.php?AgencyID=56622') time.sleep(35) chrome.save_screenshot('screenshot1.png') chrome.quit()
Screenshot shown below:
Am I doing something wrong. Please let me know if any suggestions.
Thanks