본문 바로가기
  • Tried. Failed. Logged.
728x90

셀레니움38

셀레니움 - 파이썬 봇 감지 우회 라이브러리(undetected-chromdriver) pypi https://pypi.org/project/undetected-chromedriver/ undetected-chromedriver ('Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.', 'Not triggered by CloudFlare/Imperva/hCaptcha and such.', 'NOTE: results may vary due to many factors. No guarantees are given, except for ongoing eff pypi.org 설치 pip install undetected-chromedriver 사용 예시 import u.. 2023. 1. 29.
셀레니움 - 브라우저 창 위치 안보이는 곳으로 이동 var options = new ChromeOptions(); options.AddArgument("--window-position=-32000,-32000"); var chromeDriverService = ChromeDriverService.CreateDefaultService(); chromeDriverService.HideCommandPromptWindow = true; driver = new ChromeDriver(chromeDriverService, options); 2022. 12. 19.
셀레니움 - 크로미움 옛날 버전들 다운로드 https://vikyd.github.io/download-chromium-history-version/#/ Chromium History Versions Download ↓ vikyd.github.io 2022. 12. 7.
셀레니움 - alert, confirm 완전 차단 확장 도구 https://chrome.google.com/webstore/detail/alert-control/ofjjanaennfbgpccfpbghnmblpdblbef Alert Control Control browser alert windows. Block by default or on specific websites. chrome.google.com 가끔 alert이 뜨면 셀레니움이 아예 조작이 안되는 경우가 있는데, 이 확장 도구를 설치해주면 alert이 아예 나오지 않는다. 2022. 11. 30.
셀레니움 - C#, 사용자의 기존 크롬 환경 조작하기 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 var options = new ChromeOptions(); options.DebuggerAddress = "127.0.0.1:9222"; IWebDriver driver = new ChromeDriver(options); 출처: https://stackoverflow.com/questions/67560832/use-selenium-to-attach-to-a-manually-opened-browser Use Selenium to attach to a manually opened Browser I know, that such a question.. 2022. 11. 16.
셀레니움 - 모바일 에뮬레이션 옵션 설정(ChromiumMobileEmulationDeviceSettings) private string ratio(String s) { string result = "360,640,3.0"; if (s.Contains("SM-N950N")) result = "1440,2960,3.5"; else if (s.Contains("SM-A920N")) result = "1440,2960,3.5"; else if (s.Contains("SM-A5035N")) result = "1440,2960,3.5"; else if (s.Contains("SM-G930N")) result = "1440,3040,3.5"; else if (s.Contains("SM-N960N")) result = "1080,2280,3.5"; else if (s.Contains("SM-A505N")) result = ".. 2022. 11. 15.
셀레니움 - C#, Select Option 선택 Install-Package Selenium.Support // By Text (new SelectElement(driver.FindElement(By.XPath(""))).SelectByText(""); // By Value (new SelectElement(driver.FindElement(By.XPath(""))).SelectByValue(""); 출처: https://stackoverflow.com/questions/5278281/how-to-select-an-option-from-drop-down-using-selenium-webdriver-c How to select an option from drop down using Selenium WebDriver C#? I was trying for .. 2022. 10. 26.
셀레니움 - C#, 자바스크립트 실행 결과 가져오기 // Number var newScrollHeight = (long) js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight); return document.body.scrollHeight;"); // String string title = (string)js.ExecuteScript("return document.title"); 출처: https://stackoverflow.com/questions/18572651/selenium-scroll-down-a-growing-page Selenium - Scroll down a growing page I'm using Selenium with c#. Selenium usually can automat.. 2022. 10. 26.
셀레니움 - 캡챠 우회 모듈(Captcha-Impulse) https://pypi.org/project/Captcha-Impulse/ Captcha-Impulse hCaptcha bypass with yolov5 pypi.org 설치 pip install Captcha-Impulse Demo Available labels If the requested label is not in the trained model the library will reload the captcha until it find an available label. Name Status Airplane ✅ Seaplane ❌ Bus ✅ Boat ✅ Bridge ❌ Bicycle ✅ Car ✅ Chimneys ❌ Crosswalks ❌ Fire hydrants ✅ Mountain | Hill ❌.. 2022. 10. 25.
셀레니움 - 안티봇 확인 사이트 https://bot.sannysoft.com/ Antibot bot.sannysoft.com 2022. 10. 12.
셀레니움 - 특정 URL 차단하기 chromeOptions.AddArgument("--host-resolver-rules=MAP ssl.pstatic.net 127.0.0.1"); string strCmdText; strCmdText = "/C ipconfig /flushdns"; System.Diagnostics.Process.Start("CMD.exe", strCmdText); Thread.Sleep(3000); URL의 DNS를 127.0.0.1로 설정해서 차단하는 방식이라 바로 적용하고 싶으면 dns를 초기화하는 명령어도 함께 써줘야 함 출처: 셀레니움 URL Blocking https://stackoverflow.com/questions/46891301/can-i-automate-chrome-request-blocking-usi.. 2022. 10. 11.
셀레니움 - navigator.userAgentData 모바일로 위장하기 참고 https://economytrendstory.com/1174 크롬 자동화 툴 selenium은 탐지하는 법 4가지 selenium은 탐지가 불가능 할까요?어떤 방식으로 셀레니움을 탐지 할 수 있을지 확인해보았습니다. navigator.webdriver 확인Client hints, navigator.userAgentData 확인chromedriver 탐지브라우저 지문(browser fingerprin economytrendstory.com 방법 1. 개발자 도구(F12)에서 "기기 툴바 전환" 사용 위의 글을 보면 navigator.userAgentData안에 있는 mobile, platform 같은 값을 변경하는 게 힘들다고 언급을 하는데 의외로 우회하는 방법이 간단하다. (기존에는 mobile=.. 2022. 10. 11.
728x90