title: Error crawling through locally hosted website
body: <p>I want to crawl through a website, which is currently hosted locally. Isn't it possible to crawl locally hosted website? I am getting this error:</p>
  
  <pre><code> File "C:/Users/hero/PycharmProjects/project/Crawler.py", line 22, in &lt;module&gt;
      imagefile.write(urllib.request.urlopen("http://192.168.1.1/Webpage.html"+img_src).read())
  urllib.error.HTTPError: HTTP Error 404: Not Found
  </code></pre>
  
  <p>The code for crawler:</p>
  
  <pre><code>import urllib.request
  from bs4 import BeautifulSoup
  
  
  def make_soup(url):
      thepage = urllib.request.urlopen(url)
      soupdata = BeautifulSoup(thepage, "html.parser")
      return soupdata
  
  
  i = 1
  soup = make_soup("http://192.168.1.1/Webpage.html")
  
  unique_srcs = []
  for img in soup.findAll('img'):
      if img.get('src') not in unique_srcs:
          unique_srcs.append(img.get('src'))
  for img_src in unique_srcs:
      filename = str(i)
      i = i + 1
      imagefile = open(filename + '.png', 'wb')
      imagefile.write(urllib.request.urlopen("http://192.168.1.1/Webpage.html"+img_src).read())
      imagefile.close()
  </code></pre>