bhargavnova / python-helper-modules

MIT License
7 stars 24 forks source link

Python Selenium with Tor Proxy and IP Change Verification πŸŒπŸ”’ #12

Open bhargavnova opened 9 months ago

bhargavnova commented 9 months ago

Objective:

Develop a Python script or module that utilizes Selenium with a Tor proxy to obtain a WebDriver for browsing, ensuring anonymity. Additionally, include functionality to verify that the IP address has changed.

Features:

  1. Tor Proxy Setup:

    • Implement a function to configure Selenium to use a Tor proxy for browsing.
  2. Get WebDriver:

    • Provide a function that creates and returns a WebDriver for controlled browsing.
  3. IP Change Verification:

    • Develop a mechanism to confirm that the IP address has changed after connecting through Tor.
    • well you can use Tor's official website that has information, whether you are connected to Tor or not. https://check.torproject.org/
  4. User-Friendly Output:

    • Provide clear feedback on the WebDriver creation and IP address verification.

Example Usage:

# Example usage of the Selenium with Tor proxy script
import selenium_with_tor

# Configure Selenium with Tor proxy
selenium_with_tor.setup_tor_proxy()

# Get a WebDriver for browsing
driver = selenium_with_tor.get_webdriver()

# Check if the IP address has changed
ip_changed = selenium_with_tor.verify_ip_change()

if ip_changed:
    print("IP address has changed.")
else:
    print("IP address remains the same.")

Difficulty: Intermediate/Advanced

Tags: Python, Selenium, Tor Proxy, WebDriver, IP Verification, Anonymity

Additional Information:

onkar-kota commented 9 months ago

Hey @bhargavnova ill try to solve this one, can you assign me!

bhargavnova commented 9 months ago

Sure! @onkar-kota, Thank for picking this up

onkar-kota commented 9 months ago

Sure! @onkar-kota, Thank for picking this up

It's quite interesting so picked this one. Selenium>>>