Scraping with selenium chromedriver through Tor network with the (ex. exit) nodes specified in the program code. -- 2

With Python, I need to do scraping with selenium chromedriver through Tor network with specified nodes.

By the following code, I can do scraping through Tor network, but I couldn't figure out how to specify "entry_contries", "include_countries", and "exit_countries" in that code, but Not by torrc file.

(Using Tor expert bundle: [login to view URL], not Tor browser, and Tor's path is established in advance.)


from [login to view URL] import Proxy, ProxyType

from selenium import webdriver

import subprocess

#Tor, Proxy setting

cmd = ['tor']

args = ["taskkill", "/im","[login to view URL]", "/f"]

proxy_ip_port = 'socks5://[login to view URL]'

proxy = Proxy()

proxy.proxy_type = [login to view URL]

proxy.http_proxy = proxy_ip_port

proxy.ssl_proxy = proxy_ip_port

capabilities = [login to view URL]


#Tor start

[login to view URL](cmd)

#Selenium setting

options = [login to view URL]()

options.add_experimental_option('excludeSwitches', ['enable-logging'])

driver = [login to view URL](options=options, desired_capabilities=capabilities)

#Chrome start

url = "[login to view URL]"

[login to view URL](url)

ip = driver.find_elements_by_class_name("value")[0].text

country = driver.find_elements_by_class_name("value")[4].text

print(ip + " & " + country)

#Kill Tor

[login to view URL](args)

[login to view URL]()

[login to view URL]()


So, I need the program above to be fixed.

Environment: Windows 10, Python 3.9.4

Skills: Python, Web Scraping

See more: tor network, tor network youtube view increaser, perl tor network, anyone try tor network forum, forum tor network, tor network curl, using tor network script, tor network php, tor network search engine, tor network sites forum, using tor network perl, private linux tor network, tor network api, wrt tor network, selenium chromedriver, web scraping selenium , web scraping selenium java, Host a website on the TOR network

About the Employer:
( 3 reviews ) Adachi, Japan

Project ID: #30556081

3 freelancers are bidding on average $27 for this job


You are very lucky!!! I have rich experience in scraping. so if you want to see my previous project, I can share. I can finish your project for a short time without any fail. **if you hire me, I will be your genie wh More

$30 USD in 1 day
(9 Reviews)

Dear Client Thank you for your kind attention. I've just checked your job description carefully. I'm senior developer with 5+ years of Python. By using Python, I used to make AI engine, BOT, Web Scraping Tools and so More

$30 USD in 1 day
(0 Reviews)

Hi, We are a team of experienced web designing and development experts. It would be our pleasure to work with you. We can assure you of the top notch work quality and a quick turnaround. Our service comes with a 30 da More

$20 USD in 7 days
(0 Reviews)