1

I am trying to help Tariqh with this video but I keep getting all sorts of errors I have looked through all similar questions and nothing helped

from selenium import webdriver
from time import sleep
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
d = webdriver.Chrome(ChromeDriverManager().install())

url = 'https://www.youtube.com/watch?v=YSoJPA8-oHc'

driver1 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal Bandies/chromedriver.exe')
driver2 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal Bandies/chromedriver.exe')
driver3 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal Bandies/chromedriver.exe')

driver1.get(url)
driver2.get(url)
driver3.get(url)

while True:
    driver1.refresh
    driver2.refresh
    driver3.refresh
    

I get the following errors

[3472:13232:0422/235523.116:ERROR:device_event_log_impl.cc(214)] [23:55:23.117] Bluetooth: bluetooth_adapter_winrt.cc:1075 Getting

Default Adapter failed.

====== WebDriver manager ======
Current google-chrome version is 100.0.4896
Get LATEST chromedriver version for 100.0.4896 google-chrome
Driver [C:\Users\Juan\.wdm\drivers\chromedriver\win32\100.0.4896.60\chromedriver.exe]

found in cache

====== WebDriver manager ======
Current google-chrome version is 100.0.4896
Get LATEST chromedriver version for 100.0.4896 google-chrome
Driver [C:\Users\Juan\.wdm\drivers\chromedriver\win32\100.0.4896.60\chromedriver.exe]

found in cache

Warning (from warnings module):
  File "C:/Users/Juan/Documents/Illegal Bandies/YoutubeTiktok.py", line 10
    d = webdriver.Chrome(ChromeDriverManager().install())
DeprecationWarning: executable_path has been deprecated, please pass in a Service object

Warning (from warnings module):
  File "C:/Users/Juan/Documents/Illegal Bandies/YoutubeTiktok.py", line 14
    driver1 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal

Bandies/chromedriver.exe') DeprecationWarning: executable_path has been deprecated, please pass in a Service object

Warning (from warnings module):
  File "C:/Users/Juan/Documents/Illegal Bandies/YoutubeTiktok.py", line 15
    driver2 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal

Bandies/chromedriver.exe') DeprecationWarning: executable_path has been deprecated, please pass in a Service object

Warning (from warnings module):
  File "C:/Users/Juan/Documents/Illegal Bandies/YoutubeTiktok.py", line 16
    driver3 = webdriver.Chrome(executable_path='C:/Users/Juan/Documents/Illegal

Bandies/chromedriver.exe') DeprecationWarning: executable_path has been deprecated, please pass in a Service object Traceback (most recent call last): File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Juan/Documents/Illegal Bandies/YoutubeTiktok.py", line 19, in <module>
    driver2.get(url)
  File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py",

line 437, in get self.execute(Command.GET, {'url': url}) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 423, in execute response = self.command_executor.execute(driver_command, params) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 333, in execute return self._request(command_info[0], url, body=data) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 355, in _request resp = self._conn.request(method, url, body=body, headers=headers) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\request.py", line 78, in request return self.request_encode_body( File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\request.py", line 170, in request_encode_body return self.urlopen(method, url, **extra_kw) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen retries = retries.increment( File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Users\Juan\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

I would love to also add proxies cycle but I can't at this stage of my skill. If you do the extra effort thank you I am thankful.

0 Answers0