Last active
July 1, 2022 11:07
-
-
Save jjsantanna/e6a31de0177f912deceb7d3c12fdad52 to your computer and use it in GitHub Desktop.
crawler TOR selenium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://towardsdatascience.com/how-to-scrape-the-dark-web-53145add7033 | |
from selenium import webdriver | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary | |
tor_binary_path = "/Applications/Tor Browser.app/Contents/MacOS/firefox" | |
binary = FirefoxBinary(tor_binary_path) | |
!wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-macos.tar.gz | |
!tar -xzvf geckodriver-v0.29.1-macos.tar.gz | |
!rm geckodriver-v0.29.1-macos.tar.gz | |
!mv geckodriver /usr/local/bin/ | |
!open /usr/local/bin/geckodriver | |
driver = webdriver.Firefox(firefox_binary = binary) | |
url = "http://juhanurmihxlp77nkq76byazcldy2hlmovfu2epvl5ankdibsot4csyd.onion/search/?q=leak" #search on Ahmia | |
driver.get(url) | |
username = driver.find_element_by_name(nw_user) | |
password = driver.find_element_by_name(nw_password) | |
username.send_keys("<PASTE USER NAME>") | |
password.send_keys("<PASTE PASSWORD>") | |
driver.find_element_by_css_selector("btn.btn-primary").click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment