From 8241702fb132a77a624d3de574c6a7209d7e468e Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Mon, 17 Sep 2018 23:54:06 +0930 Subject: [PATCH] Don't get page in setup phase --- scrape.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scrape.py b/scrape.py index ec4c774..6a7c5bb 100755 --- a/scrape.py +++ b/scrape.py @@ -18,15 +18,12 @@ from bs4 import BeautifulSoup graph = nx.DiGraph() -##### Set up WebDriver with Chrome and get the page ######### +##### Set up WebDriver with Chrome ########################## chrome_options = Options() chrome_options.add_argument('--headless') # Start headless so we can run on a server overnight driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=chrome_options) -driver.get("https://soundcloud.com/lacheque") -soup = BeautifulSoup(driver.page_source, "lxml") -driver.quit() ##### Do stuff ##############################################