title: How to add variable to URL?
body: <p>I'm trying to collect data from a website. I have an Excel file containing all the different extensions for the website. F.i. www.example.com/example2. I have a script that succesfully extracts the HTML from the site, but now I want to do it automatically for all the extensions. However, when I say: </p>
  
  <pre><code> siteExtension = "example2" 
   url = ("https://www.example.com/siteExtension")
   r = requests.get(url)
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>url = ("https://www.example.com/example2")
  r = requests.get(url)
  </code></pre>
  
  <p>I get an error code. Do you guys have any suggestions how to do this? Thanks in advance!</p>