mgokg commited on
Commit
6d31c60
·
verified ·
1 Parent(s): 9d5b7e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -40,7 +40,7 @@ def selenium(message):
40
  url = f"https://duckduckgo.com/?q=impressum {message}"
41
  #<ol class="AmbQnf">
42
  wd.get(url)
43
- time.sleep(1)
44
  element = wd.find_element(By.TAG_NAME, "body")
45
  #return element.text
46
  try:
@@ -63,7 +63,7 @@ def selenium(message):
63
  #element = WebDriverWait(wd, 25).until(
64
  #EC.presence_of_element_located((By.ID, 'chat-input'))
65
  #)
66
- time.sleep(4)
67
  #textarea = wd.find_element(By.XPATH, "/html/body/div/main/div[3]/div[2]/div/div[2]/div/div/div[3]/div[2]/div[1]/div/div/div/div/textarea")
68
  #textarea = wd.find_element(By.XPATH, "/html/body/div[1]/div[2]/main/div[1]/div[2]/div/div[1]/div/form/div/div[2]/div/div/div[1]/div[1]/div/textarea")
69
  element.send_keys(f"{message}")
@@ -84,10 +84,10 @@ def selenium(message):
84
  #url = 'https://www.spiegel.de'
85
  #<ol class="AmbQnf">
86
  wd.get(url)
87
- wd.implicitly_wait(3)
88
  element = wd.find_element(By.TAG_NAME, "body")
89
  #wd.quit()
90
- time.sleep(3)
91
  #return element.text
92
  results = update(element.text, message)
93
  results=gr.Markdown()
 
40
  url = f"https://duckduckgo.com/?q=impressum {message}"
41
  #<ol class="AmbQnf">
42
  wd.get(url)
43
+ time.sleep(3)
44
  element = wd.find_element(By.TAG_NAME, "body")
45
  #return element.text
46
  try:
 
63
  #element = WebDriverWait(wd, 25).until(
64
  #EC.presence_of_element_located((By.ID, 'chat-input'))
65
  #)
66
+ time.sleep(5)
67
  #textarea = wd.find_element(By.XPATH, "/html/body/div/main/div[3]/div[2]/div/div[2]/div/div/div[3]/div[2]/div[1]/div/div/div/div/textarea")
68
  #textarea = wd.find_element(By.XPATH, "/html/body/div[1]/div[2]/main/div[1]/div[2]/div/div[1]/div/form/div/div[2]/div/div/div[1]/div[1]/div/textarea")
69
  element.send_keys(f"{message}")
 
84
  #url = 'https://www.spiegel.de'
85
  #<ol class="AmbQnf">
86
  wd.get(url)
87
+ wd.implicitly_wait(5)
88
  element = wd.find_element(By.TAG_NAME, "body")
89
  #wd.quit()
90
+ time.sleep(5)
91
  #return element.text
92
  results = update(element.text, message)
93
  results=gr.Markdown()