Replies: 5 comments 3 replies
-
|
Taking control of existing browsers via remote-debugging-port is covered in https://www.youtube.com/watch?v=vt2zsdiNh3U. Note that if you take control of an existing browser that wasn't stealthy to begin with, then you probably still won't be stealthy. Plenty of examples of Cloudflare-bypass in the SeleniumBase/examples/cdp_mode folder:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks MIke, appreaciate the quick response. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry Mike, you're dealing with a Python-challenged 72 year old Australian. I'm OK with Excel VBA, you are operating at about 10 levels higher in the programming world. But guess what, I got it to f***ing work. Turned out to be easy. I ran the gitlab example with the URL changed to the page I want to work with, got the page open with Captcha bypassed, and left the page open by using a checkpoint() at the end of the code. Then I ran my Excel VBA code using port 9222 (guessed the number) and it hooked in no problem. One question, the Chrome window closes when the code is complete. Is there any way of leaving it open (other than checkpoint() or similar? If you're ever around the Sunshine Coast, Queensland, Australia, I'll buy you a beer. Dain |
Beta Was this translation helpful? Give feedback.
-
|
Next day..... Not sure under GitHub etiquette whether I should continue this discussion or start a new one with a different subject. File "raw_cf.py", line 4, in Any ideas? I wouldnt have a clue about whether this is something specific to my PC, or a general Python issue, or Pyinstaller not doing its job properly, something to do with SeleniumBase. Regards, Dain PS Also tried Py2Exe to build the file, same result |
Beta Was this translation helpful? Give feedback.
-
|
Answer is getting complicated but here goes
Traceback (most recent call last): In any case, even when I run as a PY file, these methods don't help me as they dont seem to generate a Chrome remote debugging window (happy to be corrected here if this is an incorrect statement)
Warning: uc_driver not found. Getting it now: *** chromedriver to download = 142.0.7444.175 (Previous Version) Downloading chromedriver-win64.zip from: Extracting ['chromedriver.exe'] from chromedriver-win64.zip ... The file [uc_driver.exe] was saved to: Making [uc_driver.exe 142.0.7444.175] executable ... Then things work - webpages open and Captcha is bypassed - but then things eventually fail with all the same messages as shown in section 1 above.
When I complied and ran, there was the same behaviour as in section 2. Same missing drivers, installing uc_driver etc So suddenly there are two sets of issues -the one relating to presence or not of Chromedriver, the second relating to the messages in section 1. The weird thing is despite all of the above, I have a workable solution - if get rid of the chromedriver, and put in a very long sleep function, I can get my page open, Capcha bypassed, and do the required scraping via my Excel progam. Dain |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've used SeleniumBase OK in two situations independently - it's great.
Has already managed to combine the two? eg
---- so far so good
3.When I then try to log on to the required website, Cloudflare stops things. I assue that it detects Chrome in remote debugging mode and there's no way around this.
Any ideas / suggestions? The application might seem weird, but I have a system using SeleniumVBA in Excel that no longer works because CloudFlare blocks login. I can rewrite everything to use SeleniumBase but am trying to avoid the work. If I can get logged in via SeleniumBase to the open Chrome window, I can then connect into this with SeleniumVBA and its business as usual.
Look forward ot any suggestion, Dain
Beta Was this translation helpful? Give feedback.
All reactions