title: Scrape the absolute URL instead of a relative path in python
body: <p>I'm trying to get all the href's from a HTML code and store it in a list for future processing such as this: </p>
  
  <p>Example URL: www.example-page-xl.com</p>
  
  <pre><code> &lt;body&gt;
      &lt;section&gt;
      &lt;a href="/helloworld/index.php"&gt; Hello World &lt;/a&gt;
      &lt;/section&gt;
   &lt;/body&gt;
  </code></pre>
  
  <p>I'm using the following code to list the href's:</p>
  
  <pre><code>import bs4 as bs4
  import urllib.request
  
  sauce = urllib.request.urlopen('https:www.example-page-xl.com').read()
  soup = bs.BeautifulSoup(sauce,'lxml')
  
  section = soup.section
  
  for url in section.find_all('a'):
      print(url.get('href'))
  </code></pre>
  
  <p><strong>However I would like to store the URL as:
  www.example-page-xl.com/helloworld/index.php and not just the relative path which is /helloworld/index.php</strong></p>
  
  <p>Appending/joining the URL with the relative path isn't required since the dynamic links may vary when I join the URL and the relative path.</p>
  
  <p>In a nutshell I would like to scrape the absolute URL and not relative paths alone (and without joining)</p>