mgokg commited on
Commit
63b9b65
·
verified ·
1 Parent(s): 992bc4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def update(prompt, ort):
35
 
36
  def selenium(message):
37
 
38
- url = "https://copilot.microsoft.com/"
39
  #url = 'https://www.spiegel.de'
40
  #<ol class="AmbQnf">
41
  wd.get(url)
@@ -43,7 +43,7 @@ def selenium(message):
43
  #wait = WebDriverWait(wd, 15) # Korrektur der Instanziierung
44
  #textarea = wait.until(EC.visibility_of_element_located((By.ID, "userInput"))) # Korrektur der Verwendung von EC
45
  text_input = WebDriverWait(wd, 25).until(
46
- EC.presence_of_element_located((By.ID, 'userInput'))
47
  )
48
  #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")
49
  #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")
@@ -51,7 +51,7 @@ def selenium(message):
51
  time.sleep(2)
52
  text_input.send_keys(Keys.RETURN)
53
  time.sleep(8)
54
- elements = wd.find_elements(By.TAG_NAME, "span")
55
  time.sleep(3)
56
  out=""
57
  for e in elements:
 
35
 
36
  def selenium(message):
37
 
38
+ url = "https://chat.deepseek.com/"
39
  #url = 'https://www.spiegel.de'
40
  #<ol class="AmbQnf">
41
  wd.get(url)
 
43
  #wait = WebDriverWait(wd, 15) # Korrektur der Instanziierung
44
  #textarea = wait.until(EC.visibility_of_element_located((By.ID, "userInput"))) # Korrektur der Verwendung von EC
45
  text_input = WebDriverWait(wd, 25).until(
46
+ EC.presence_of_element_located((By.ID, 'chat-input'))
47
  )
48
  #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")
49
  #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")
 
51
  time.sleep(2)
52
  text_input.send_keys(Keys.RETURN)
53
  time.sleep(8)
54
+ elements = wd.find_elements(By.TAG_NAME, "p")
55
  time.sleep(3)
56
  out=""
57
  for e in elements: