본문 바로가기
728x90
반응형

캡챠3

파이썬 - 캡챠 생성기(captcha) 모듈 설치 pip install captcha 글자 생성 예시 # Import the following modules from captcha.image import ImageCaptcha # Create an image instance of the given size image = ImageCaptcha(width = 280, height = 90) # Image captcha text captcha_text = 'GeeksforGeeks' # generate the image of the given text data = image.generate(captcha_text) # write the image on the given file and save it image.write(captcha_text, .. 2023. 3. 12.
셀레니움 - 이미지(img) 다운로드 (No urllib.urlretrieve) URL 요청 방식인 urllib.urlretrieve은 src 주소로 요청을 하는 방식이기 때문에 캡챠(자동등록방지 문자)처럼 매번 요청할 때마다 이미지가 바뀌는 경우가 있어 무용지물이 된다. 그러므로 이미 브라우저에 로드가 된 이미지를 가져오는 방법을 사용해야 한다. 방법 1. screenshot_as_png 사용 (추천) from selenium import webdriver driver = webdriver.Firefox() driver.get('https://www.webpagetest.org/') with open('filename.png', 'wb') as file: file.write(driver.find_element_by_xpath('/html/body/div[1]/div[5]/div[2.. 2023. 2. 28.
셀레니움 - 캡챠 우회 모듈(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.
728x90
반응형