|
@@ -55,20 +55,35 @@ def init_browser(proxy1='proxy1',tiny1='tiny1',socks5="9050",debug='9922',cdrive
|
|
|
class JParams(object):
|
|
|
|
|
|
def get(self, yt,proxy1,tiny1,socks5,debug,cdriver):
|
|
|
+ url='https://www.youtube.com/watch?v='+yt
|
|
|
driver=init_browser(proxy1='proxy1',tiny1='tiny1',socks5="9050",debug='9922',cdriver='/root/webdriver/98/chromedriver')
|
|
|
#driver.get('https://www.youtube.com/watch?v=K5DEJXajtqA')
|
|
|
- driver.get('https://www.youtube.com/watch?v='+yt)
|
|
|
+ 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)
|
|
|
+ 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
|
|
|
|
|
|
|
|
|
- print('kw')
|
|
|
- print(domain)
|
|
|
+ time.sleep(31)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
fire.Fire(JParams)
|