title: Make a list of all the files on a website
body: <p>I am working on a program that searches for something on the internet using <code>xgoogle</code>, then finds all the files in the websites of the results. I am having trouble with finding all the files in a website. I found a <a href="https://stackoverflow.com/questions/13786210/list-all-files-in-an-online-directory-with-python">question</a> that was similar, but I couldn't get it to work. Here is the code I've been using.</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import requests
  def find_files():
      url = "http://www.python.org"
      soup = BeautifulSoup(requests.get(url).text)
      for a in soup.find('div', {'class': 'catlist'}).find_all('a'):
          yield url + a['href']
  </code></pre>
  
  <p>The code doesn't run when I call it. I have put print statements in the function, but nothing happens. 
  What should I do to fix it? How could this function return a list of all the files in the website?</p>