Jared 2 年之前
父節點
當前提交
a9b543fbc0
共有 1 個文件被更改,包括 27 次插入0 次删除
  1. 27 0
      choozmo/watch_yt.py

+ 27 - 0
choozmo/watch_yt.py

@@ -83,6 +83,33 @@ class JParams(object):
     video.click()               #mouse click
 
 
+    driver.execute_script('window.open("'+url+'","_blank");')
+    driver.execute_script("window.scrollTo(0, window.scrollY + 400)")
+    time.sleep(3)
+    driver.get(url)
+    video = driver.find_element_by_id('movie_player')
+    video.send_keys(Keys.SPACE) #hits space
+    time.sleep(1)
+    video.click()               #mouse click
+
+    driver.execute_script('window.open("'+url+'","_blank");')
+    driver.execute_script("window.scrollTo(0, window.scrollY + 400)")
+    time.sleep(3)
+    driver.get(url)
+    video = driver.find_element_by_id('movie_player')
+    video.send_keys(Keys.SPACE) #hits space
+    time.sleep(1)
+    video.click()               #mouse click
+
+    driver.execute_script('window.open("'+url+'","_blank");')
+    driver.execute_script("window.scrollTo(0, window.scrollY + 400)")
+    time.sleep(3)
+    driver.get(url)
+    video = driver.find_element_by_id('movie_player')
+    video.send_keys(Keys.SPACE) #hits space
+    time.sleep(1)
+    video.click()               #mouse click
+
     time.sleep(31)
 
 if __name__ == '__main__':