Commit
•
5a657bd
1
Parent(s):
2fd7810
Update app.py
Browse files
app.py
CHANGED
@@ -7,24 +7,7 @@ import streamlit as st
|
|
7 |
import os
|
8 |
import subprocess
|
9 |
import chromedriver_autoinstaller
|
10 |
-
|
11 |
-
commands = [
|
12 |
-
'sudo apt -y update',
|
13 |
-
'sudo apt install -y wget curl unzip',
|
14 |
-
'sudo wget http://archive.ubuntu.com/ubuntu/pool/main/libu/libu2f-host/libu2f-udev_1.1.4-1_all.deb',
|
15 |
-
'sudo dpkg -i libu2f-udev_1.1.4-1_all.deb',
|
16 |
-
'sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb',
|
17 |
-
'sudo dpkg -i google-chrome-stable_current_amd64.deb',
|
18 |
-
'CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`',
|
19 |
-
'sudo wget -N https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P /tmp/',
|
20 |
-
'sudo unzip -o /tmp/chromedriver_linux64.zip -d /tmp/',
|
21 |
-
'sudo chmod +x /tmp/chromedriver',
|
22 |
-
'sudo mv /tmp/chromedriver /usr/local/bin/chromedriver'
|
23 |
-
]
|
24 |
-
|
25 |
-
for command in commands:
|
26 |
-
subprocess.run(command, shell=True)
|
27 |
-
|
28 |
chrome_options = webdriver.ChromeOptions()
|
29 |
chrome_options.add_argument('--headless')
|
30 |
chrome_options.add_argument('--no-sandbox')
|
|
|
7 |
import os
|
8 |
import subprocess
|
9 |
import chromedriver_autoinstaller
|
10 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
chrome_options = webdriver.ChromeOptions()
|
12 |
chrome_options.add_argument('--headless')
|
13 |
chrome_options.add_argument('--no-sandbox')
|