Python-Firefox를 통한 Tor 브라우저, 버튼을 클릭 할 수 없음

잔디

그래서 나는 Firefox를 통해 프록시로 Tor 브라우저를 통해 특정 사이트 (dumpert.nl)에 액세스하려고했습니다. 제가 Tor 브라우저를 사용하는 이유는 웹 사이트에 들어갈 때마다 다른 IP 주소로 웹 사이트에 들어갈 수 있기 때문입니다. 나는 이것이 가능하다는 것을 알고 있지만 아직 이것을 할 방법을 찾지 못했습니다. 이 작업을 수행하는 여러 가지 방법을 찾았지만 (아직) 나를 위해 일하지 않았습니다. 이 부분에 대해서도 도움이 필요합니다.

진짜 문제는이 웹 사이트의 쿠키 허용 페이지에 문제가 있다는 것입니다. 쿠키를 수락하기 위해 수동으로 버튼을 클릭해도 아무 일도 일어나지 않습니다. 다음 페이지로 진행할 수 없습니다. 셀레늄의 .click () 함수를 사용하면 아무 일도 일어나지 않으며 페이지가 완전히로드되면 문제가되지 않습니다. 버튼이 어떤 이유로 작동하지 않으며 이유가 없습니다. Tor 문제인지 아니면 Tor 문제를 통해 firefox를 사용하는지 모르겠습니다.

다음 코드를 사용하여 웹 사이트로 이동합니다.

    from selenium import webdriver
    from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
    import os

    torexe = os.popen(r'C:\Users\nick\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe')
    profile = FirefoxProfile(r'C:\Users\nick\Desktop\Tor Browser\Browser\TorBrowser\Data\Browser\profile.default')
    profile.set_preference('network.proxy.type', 1)
    profile.set_preference('network.proxy.socks', '127.0.0.1')
    profile.set_preference('network.proxy.socks_port', 9050)
    profile.set_preference("network.proxy.socks_remote_dns", False)
    profile.update_preferences()
    driver = webdriver.Firefox(firefox_profile= profile, executable_path=r'C:\Webdrivers\geckodriver.exe')
    driver.get("http://dumpert.nl")
    driver.find_element_by_xpath("/html/body/div[2]/div/div[2]/a").click() #cookie click

    #Rest of my code doing stuff not important for this issue
DebanjanB

웹 페이지를 열려면 http://dumpert.nlclick()원하는 버튼에 당신은 유도해야 WebDriverWait을 을 위해 element_to_be_clickable()당신은 다음 중 하나를 사용할 수 있습니다 로케이터 전략 :

  • 사용 CSS_SELECTOR:

    from selenium import webdriver
    from selenium.webdriver.support.ui import WebDriverWait
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support import expected_conditions as EC
    from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
    import os
    
    torexe = os.popen(r'C:\Users\Soma Bhattacharjee\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe')
    profile = FirefoxProfile(r'C:\Users\Soma Bhattacharjee\Desktop\Tor Browser\Browser\TorBrowser\Data\Browser\profile.default')
    profile.set_preference('network.proxy.type', 1)
    profile.set_preference('network.proxy.socks', '127.0.0.1')
    profile.set_preference('network.proxy.socks_port', 9050)
    profile.set_preference("network.proxy.socks_remote_dns", False)
    profile.update_preferences()
    driver = webdriver.Firefox(firefox_profile= profile, executable_path=r'C:\WebDrivers\geckodriver.exe')
    driver.get("http://dumpert.nl")
    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.approve-btn[title^='And yes']>span"))).click()
    
  • 사용 XPATH:

    from selenium import webdriver
    from selenium.webdriver.support.ui import WebDriverWait
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support import expected_conditions as EC
    from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
    import os
    
    torexe = os.popen(r'C:\Users\Soma Bhattacharjee\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe')
    profile = FirefoxProfile(r'C:\Users\Soma Bhattacharjee\Desktop\Tor Browser\Browser\TorBrowser\Data\Browser\profile.default')
    profile.set_preference('network.proxy.type', 1)
    profile.set_preference('network.proxy.socks', '127.0.0.1')
    profile.set_preference('network.proxy.socks_port', 9050)
    profile.set_preference("network.proxy.socks_remote_dns", False)
    profile.update_preferences()
    driver = webdriver.Firefox(firefox_profile= profile, executable_path=r'C:\WebDrivers\geckodriver.exe')
    driver.get("http://dumpert.nl")
    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//a[@class='approve-btn']/span[starts-with(., 'Yes')]"))).click()
    
  • 브라우저 스냅 샷 :

tor_page

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

웹 드라이버를 사용하여 버튼을 클릭 할 수 없음

분류에서Dev

웹 드라이버를 사용하는 크롬 브라우저의 iframe 안에있는 버튼을 클릭 할 수 없습니다.

분류에서Dev

UiPath가 Chrome 브라우저 팝업 대화 상자를 클릭 할 수 없음

분류에서Dev

Selenium Python : 버튼을 클릭 할 수 없음

분류에서Dev

ElementClickInterceptedException Selenium이 Python 버튼을 클릭 할 수 없음

분류에서Dev

Python Selemium- 버튼을 클릭 할 수 없음

분류에서Dev

Python 셀레늄이 버튼을 클릭 할 수 없음

분류에서Dev

WebDriver : '라디오 버튼'을 클릭 할 수 없음

분류에서Dev

ID를 클릭하여 ID 버튼을 경고 할 수 없음

분류에서Dev

Selenium 및 Python으로 Tor 브라우저에서 버튼을 클릭하는 방법

분류에서Dev

xpath 및 AndroidUIAutomator를 통해 로그인 버튼을 클릭 할 수 없습니다.

분류에서Dev

Python-Selenium은 클릭 할 버튼의 "id"를 찾을 수 없습니다.

분류에서Dev

버튼을 클릭 할 수 없음-클릭 비활성화

분류에서Dev

TOR를 설치했지만 브라우저를 찾을 수 없습니다.

분류에서Dev

내 앱에서 웹 브라우저를 시작하고 클릭 한 URL을 반환 할 수 있습니까?

분류에서Dev

addThis 버튼은 jQuery를 통해 클릭 할 수 없습니다.

분류에서Dev

로그인 버튼을 클릭 할 때 페이지를 찾을 수 없음 404

분류에서Dev

헤드리스 Chrome 요소를 클릭 할 수 없음 (브라우저 모드에서 작동)

분류에서Dev

웹 브라우저를 통해 Odoo 서버에 연결할 수 없습니다.

분류에서Dev

이 버튼을 클릭 할 수 없습니다. selenium webdriver python

분류에서Dev

브라우저를 통해 WebDav를 탐색 할 수 있지만 드라이브에 매핑 할 수 없음

분류에서Dev

클릭 가능한 div 내부의 버튼을 클릭 할 수 없습니다.

분류에서Dev

한 번의 클릭 후 버튼을 클릭 할 수 없도록 설정

분류에서Dev

CSS를 추가 한 후 컨트롤을 클릭 할 수 없음

분류에서Dev

ionic으로 로그인 할 수 없음 (웹 브라우저를 통해 인증 할 수 없음)

분류에서Dev

Watir를 통해 Tor-Firefox에 연결할 수 없습니다.

분류에서Dev

셀레늄으로 버튼을 클릭 할 수 없음

분류에서Dev

HTML 이메일 서명의 버튼을 클릭 할 수 없음

분류에서Dev

Flutter 넘친 위치 버튼을 클릭 할 수 없음

Related 관련 기사

  1. 1

    웹 드라이버를 사용하여 버튼을 클릭 할 수 없음

  2. 2

    웹 드라이버를 사용하는 크롬 브라우저의 iframe 안에있는 버튼을 클릭 할 수 없습니다.

  3. 3

    UiPath가 Chrome 브라우저 팝업 대화 상자를 클릭 할 수 없음

  4. 4

    Selenium Python : 버튼을 클릭 할 수 없음

  5. 5

    ElementClickInterceptedException Selenium이 Python 버튼을 클릭 할 수 없음

  6. 6

    Python Selemium- 버튼을 클릭 할 수 없음

  7. 7

    Python 셀레늄이 버튼을 클릭 할 수 없음

  8. 8

    WebDriver : '라디오 버튼'을 클릭 할 수 없음

  9. 9

    ID를 클릭하여 ID 버튼을 경고 할 수 없음

  10. 10

    Selenium 및 Python으로 Tor 브라우저에서 버튼을 클릭하는 방법

  11. 11

    xpath 및 AndroidUIAutomator를 통해 로그인 버튼을 클릭 할 수 없습니다.

  12. 12

    Python-Selenium은 클릭 할 버튼의 "id"를 찾을 수 없습니다.

  13. 13

    버튼을 클릭 할 수 없음-클릭 비활성화

  14. 14

    TOR를 설치했지만 브라우저를 찾을 수 없습니다.

  15. 15

    내 앱에서 웹 브라우저를 시작하고 클릭 한 URL을 반환 할 수 있습니까?

  16. 16

    addThis 버튼은 jQuery를 통해 클릭 할 수 없습니다.

  17. 17

    로그인 버튼을 클릭 할 때 페이지를 찾을 수 없음 404

  18. 18

    헤드리스 Chrome 요소를 클릭 할 수 없음 (브라우저 모드에서 작동)

  19. 19

    웹 브라우저를 통해 Odoo 서버에 연결할 수 없습니다.

  20. 20

    이 버튼을 클릭 할 수 없습니다. selenium webdriver python

  21. 21

    브라우저를 통해 WebDav를 탐색 할 수 있지만 드라이브에 매핑 할 수 없음

  22. 22

    클릭 가능한 div 내부의 버튼을 클릭 할 수 없습니다.

  23. 23

    한 번의 클릭 후 버튼을 클릭 할 수 없도록 설정

  24. 24

    CSS를 추가 한 후 컨트롤을 클릭 할 수 없음

  25. 25

    ionic으로 로그인 할 수 없음 (웹 브라우저를 통해 인증 할 수 없음)

  26. 26

    Watir를 통해 Tor-Firefox에 연결할 수 없습니다.

  27. 27

    셀레늄으로 버튼을 클릭 할 수 없음

  28. 28

    HTML 이메일 서명의 버튼을 클릭 할 수 없음

  29. 29

    Flutter 넘친 위치 버튼을 클릭 할 수 없음

뜨겁다태그

보관