title: selenium.common.exceptions.InvalidArgumentException: Message: invalid argument error invoking get() with urls read from text file with Selenium Python
body: <p>I have a list of URLs in a .txt file that I would like to run using selenium.</p>
  
  <p>Lets say that the file name is b.txt in it contains 2 urls (precisely formatted as below): 
  <a href="https://www.google.com/,https://www.bing.com/" rel="noreferrer">https://www.google.com/,https://www.bing.com/</a>,</p>
  
  <p>What I am trying to do is to make selenium run both urls (from the .txt file), however it seems that every time the code reaches the "driver.get" line, the code fails.</p>
  
  <pre><code>url = open ('b.txt','r')
  url_rpt = url.read().split(",")
  options = Options()
  options.add_argument('--headless')
  options.add_argument('--disable-gpu')
  driver = webdriver.Chrome(chrome_options=options)
  for link in url_rpt:
     driver.get(link)
  driver.quit()
  </code></pre>
  
  <p>The result that I get when I run the code is</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/ASUS/PycharmProjects/XXXX/Test.py", line 22, in &lt;module&gt;
  driver.get(link)
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python38\lib\site- 
  packages\selenium\webdriver\remote\webdriver.py", line 333, in get
  self.execute(Command.GET, {'url': url})
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python38\lib\site- 
  packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
  self.error_handler.check_response(response)
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python38\lib\site- 
  packages\selenium\webdriver\remote\errorhandler.py", line 242, in 
  check_response
  raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.InvalidArgumentException: Message: invalid 
  argument
  (Session info: headless chrome=79.0.3945.117)
  </code></pre>
  
  <p>Any suggestion on how to re-write the code?</p>