title: Python - Selenium - Scraping through multiple websites
body: <p>I am trying to build a webscraper with python / selenium that scrapes data from multiple websites and stores the data in an Excel sheet.</p>
  <p>The sites I want to scrape are the following:</p>
  <pre><code>https://www.ngm.se/marknaden/vardepapper?symbol=ETH%20ZERO%20SEK
  https://www.ngm.se/marknaden/vardepapper?symbol=BTC%20ZERO%20SEK
  https://www.ngm.se/marknaden/vardepapper?symbol=VALOUR%20CARDANO%20SEK
  https://www.ngm.se/marknaden/vardepapper?symbol=VALOUR%20POLKADOT%20SEK
  https://www.ngm.se/marknaden/vardepapper?symbol=VALOUR%20SOLANA%20SEK
  https://www.ngm.se/marknaden/vardepapper?symbol=VALOUR%20UNISWAP%20SEK
  </code></pre>
  <p>From all sites I want to scrape the &quot;Omsättning&quot;, &quot;Volym&quot; and &quot;VWAP&quot; values and store them in an excel sheet.</p>
  <p>This is what I got so far:</p>
  <pre><code>
      from selenium import webdriver
      from selenium.webdriver.common.by import By
      from selenium.webdriver.support.ui import WebDriverWait
      from selenium.webdriver.support import expected_conditions as EC
      from selenium.common.exceptions import ElementNotVisibleException
      
      url = [&quot;https://www.ngm.se/marknaden/vardepapper?symbol=ETH%20ZERO%20SEK&quot;]
      
      driver = webdriver.Chrome()
      
      driver.get('https://www.ngm.se/marknaden/vardepapper?symbol=ETH%20ZERO%20SEK')
      
      iframe = driver.find_element(By.XPATH, '//iframe').get_attribute(&quot;src&quot;)
      driver.get(iframe)
      
      element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, '//div[@id=&quot;detailviewDiv&quot;]//thead[.//span[contains(text(),&quot;Volym&quot;)]]/following-sibling::tbody')))
      
      volym = element.text.split('\n')[-3]
      vwap = element.text.split('\n')[-2]
      Omsaettning = element.text.split('\n')[-4]
      
      print(volym, vwap, Omsaettning)
  
  </code></pre>
  <p>With that I am able to print the values from the ETH ZERO SEK website, however how can I simultaneously also scrape the data from the other wesbites and then store it into an excel?
  Also is possible to program it so that selenium does not need to open the browser to save on computer ressources?</p>
  <p>Thanks a lot for any help in advance!</p>