title: How do I use Python-Selenium-BS4-send keys and return varying URL
body: <p>I am trying to get a hang of the webscraping with BS4. I need to input the provider name and then scrape the info after the search is done. My question is, when using input variables with Python to 'send_keys' and search, how do I write my script to always return the new URL when the input variables will change each time I input a new provider? 
  All of the resources I have found online only focus on one hard coded URL to scrape from and don't have the input interaction to send keys and return a new varying URL. See my current code below.
  Thanks for any guidance! </p>
  
  <pre><code>print('Hello! Let\s create a new provider!')
  print('What is the provider\s first name?')
  FirstName = input()
  print('What is the provider\s last name?')
  LastName = input()
  print('One moment while I search!')
  from selenium import webdriver
  browser = webdriver.Chrome()
  browser.get('https://npiregistry.cms.hhs.gov/')
  FirstElem = browser.find_elements_by_css_selector('#id_first_name')
  FirstElem[0].send_keys(FirstName)
  LastElem = browser.find_elements_by_css_selector('#id_last_name')
  LastElem[0].send_keys(LastName)
  CityElem = browser.find_elements_by_css_selector('#id_city')
  CityElem[0].send_keys('Fairbanks')
  SearchElem = browser.find_elements_by_xpath('//*[@id="508focusheader"]/div[2]/div/form/div[5]/div/div/input[2]')
  SearchElem[0].click()
  NpiElem = browser.find_elements_by_xpath('/html/body/div[2]/div[2]/div/table/tbody/tr/td[1]/a')
  NpiElem[0].click()
  </code></pre>