title: IndexError at a loop with Beautifulsoup
body: <p>The very famous IndexError. Unfortunately, I really did not find a solution.</p>
  
  <p>The last time visit at the last URL, I always get an error. Whether the website is empty or not. This error occurs whether the range is 2 or 20.</p>
  
  <pre><code>    text_file = open("Results-from-{}.txt".format(self.entry_get), "w")
  
      ### Iterator for end of the url
      multiple_url = []
      for iterator_page in range(15):
              iterator_page = iterator_page + 1
              multiple_url.append("".join([self.sub_url, str(iterator_page)]))
  
      ### loop for visit all 20 pages ###
      parser = 0
      while parser &lt; len(multiple_url):
          print(multiple_url[parser])
          parser += 1
          with urllib.request.urlopen(multiple_url[parser]) as url:
              soup = BeautifulSoup(url, "html.parser")
  
      ### html tag parsing
              names = [name.get_text().strip() for name in soup.findAll("div", {"class": "name m08_name"})]
              street = [address.get_text().strip() for address in soup.findAll(itemprop="streetAddress")]
              plz = [address.get_text().strip() for address in soup.findAll(itemprop="postalCode")]
              city = [address.get_text().strip() for address in soup.findAll(itemprop="addressLocality")]
  
      ### zip and write
              for line in zip(names, street, plz , city):
                  print("%s;%s;%s;%s;\n" % line)
                  text_file.write("%s;%s;%s;%s;\n" % line)
  
      ### output of the path main: cwd_out_final
      cwd = os.getcwd()
      cwd_out = "\{}".format(text_file.name)
      cwd_out_final = cwd + cwd_out
  
  
      text_file.close()
  </code></pre>
  
  <p>My Error:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 1699, in __call__
      return self.func(*args)
    File "/Users/x/PycharmProjects/hackday/parser.py", line 55, in search_complete_inner
      with urllib.request.urlopen(multiple_url[parser]) as url:
  IndexError: list index out of range
  </code></pre>
  
  <p>Thank You!</p>