Fullscreen is not working on the web video player
This commit is contained in:
parent
004d913520
commit
58d538183b
@ -2,6 +2,7 @@ from selenium import webdriver
|
|||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
from selenium.webdriver.support import expected_conditions as EC
|
from selenium.webdriver.support import expected_conditions as EC
|
||||||
from selenium.webdriver.support.ui import WebDriverWait
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
|
from selenium.webdriver import ActionChains
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class Web_StreamService:
|
class Web_StreamService:
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
from fcntl import F_SEAL_SEAL
|
|
||||||
import requests
|
import requests
|
||||||
from streaming.base_stream import *
|
from streaming.base_stream import *
|
||||||
import os, time
|
import os, time
|
||||||
@ -52,6 +51,17 @@ class Web_Youtube(Web_StreamService):
|
|||||||
|
|
||||||
def post_load_actions(self, driver):
|
def post_load_actions(self, driver):
|
||||||
self.bypass_cookies(driver)
|
self.bypass_cookies(driver)
|
||||||
|
# self.double_click_fullscreen(driver) does not work
|
||||||
|
|
||||||
|
def double_click_fullscreen(self, driver):
|
||||||
|
while True:
|
||||||
|
if len(driver.find_elements(by=By.XPATH, value='//*[@id="movie_player"]/div[1]/video')) > 0:
|
||||||
|
video = driver.find_elements(by=By.XPATH, value='//*[@id="movie_player"]/div[1]/video')[0]
|
||||||
|
break
|
||||||
|
time.sleep(5)
|
||||||
|
action = ActionChains(driver)
|
||||||
|
action.double_click(video)
|
||||||
|
# video.click();time.sleep(.1);video.click()
|
||||||
|
|
||||||
def bypass_cookies(self, driver):
|
def bypass_cookies(self, driver):
|
||||||
if 'consent.youtube.com' in driver.current_url:
|
if 'consent.youtube.com' in driver.current_url:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[main]
|
[main]
|
||||||
streaming_method = video
|
streaming_method = web
|
||||||
streaming_service = youtube
|
streaming_service = youtube
|
||||||
|
|
||||||
[kerk]
|
[kerk]
|
||||||
|
Loading…
Reference in New Issue
Block a user