Polo123 commited on
Commit
431ef39
1 Parent(s): 533d780

Update steps/Bots.py

Browse files
Files changed (1) hide show
  1. steps/Bots.py +5 -5
steps/Bots.py CHANGED
@@ -4,10 +4,11 @@ from selenium.webdriver.common.by import By
4
  from selenium.webdriver.support.ui import WebDriverWait
5
  from selenium.webdriver.support import expected_conditions as EC
6
  from selenium.webdriver.common.keys import Keys
7
- from selenium.webdriver.firefox.options import Options
8
 
9
- options = Options()
10
- options.add_argument("--headless")
 
 
11
 
12
 
13
 
@@ -35,8 +36,7 @@ class CompetitorBot(BOT):
35
  '''
36
 
37
  def target_html(self,company_name: str) -> str:
38
- browser = webdriver.Firefox(options=options)
39
- # browser = webdriver.Firefox()
40
 
41
  #Searching on FireFox
42
  browser.get('http://www.google.com')
 
4
  from selenium.webdriver.support.ui import WebDriverWait
5
  from selenium.webdriver.support import expected_conditions as EC
6
  from selenium.webdriver.common.keys import Keys
 
7
 
8
+ options = webdriver.ChromeOptions()
9
+ options.add_argument('--headless')
10
+ options.add_argument('--no-sandbox')
11
+ options.add_argument('--disable-dev-shm-usage')
12
 
13
 
14
 
 
36
  '''
37
 
38
  def target_html(self,company_name: str) -> str:
39
+ browser = webdriver.Chrome(options=options)
 
40
 
41
  #Searching on FireFox
42
  browser.get('http://www.google.com')