Move scrape out of main in scrape.py, so scrape.py can be called by gui.py.