From 40bda4db8a6309fb53fa7c225287fbb026d8c99a Mon Sep 17 00:00:00 2001
From: Russell Jarvis <rjjarvis@asu.edu>
Date: Wed, 24 Jun 2020 08:47:20 +1000
Subject: [PATCH] update

---
 install_python3.sh | 13 +++++++++++++
 scrape.py          | 26 +++++++++++++++-----------
 2 files changed, 28 insertions(+), 11 deletions(-)
 create mode 100644 install_python3.sh

diff --git a/install_python3.sh b/install_python3.sh
new file mode 100644
index 0000000..5a1e89b
--- /dev/null
+++ b/install_python3.sh
@@ -0,0 +1,13 @@
+
+
+
+
+wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
+bash miniconda.sh -b -p $HOME/miniconda
+export PATH="$HOME/miniconda/bin:$PATH"
+hash -r
+conda config --set always_yes yes --set changeps1 no
+conda update -q conda
+conda info -a
+pip install -U pip
+
diff --git a/scrape.py b/scrape.py
index 96f7212..d976704 100644
--- a/scrape.py
+++ b/scrape.py
@@ -58,19 +58,23 @@ options.add_argument("--headless")
 
 import os
 try:
-    #driver = webdriver.Firefox(options=options)
-    GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver")
-    driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
+    driver = webdriver.Firefox(options=options)
 
 except:
-    #GECKODRIVER_PATH="/app/vendor/geckodriver/geckodriver"
-    #driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
-    os.system("wget wget https://ftp.mozilla.org/pub/firefox/releases/45.0.2/linux-x86_64/en-GB/firefox-45.0.2.tar.bz2")
-    os.system("wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz")
-    os.system("tar -xf geckodriver-v0.26.0-linux64.tar.gz")
-    os.system("tar xvf firefox-45.0.2.tar.bz2")
-    GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver")
-    driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
+    try:
+        #driver = webdriver.Firefox(options=options)
+        GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver")
+        driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
+
+    except:
+        #GECKODRIVER_PATH="/app/vendor/geckodriver/geckodriver"
+        #driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
+        #os.system("wget wget https://ftp.mozilla.org/pub/firefox/releases/45.0.2/linux-x86_64/en-GB/firefox-45.0.2.tar.bz2")
+        os.system("wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz")
+        os.system("tar -xf geckodriver-v0.26.0-linux64.tar.gz")
+        #os.system("tar xvf firefox-45.0.2.tar.bz2")
+        GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver")
+        driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH)
 
 
 
-- 
GitLab