爱好HtmlCssJs 2020-01-18
from selenium import webdriverfrom time import sleepdriver = webdriver.Firefox()driver.get("http://videojs.com")video = driver.find_element_by_xpath("body/Setion[1]/div/video")#返回播放文件地址url = driver.execute_script("return arguments[0].currentSrc;",video)print(url)#播放视频print("start")driver.execute_script("return arguments[0].play()",video)#播放15秒sleep(15)#暂停视频print("stop")driver.execute_script("arguments[0].pause()",video)
doctype html> HTML5使用UTF-8编码演示:。<meta charset="UTF-8">2.HTML5中如何嵌入音频?</audio>3.HTML5中如何嵌入视频?</video&