所以我在一个有播放列表的网页上看了一些视频。播放列表的问题在于它没有“自动播放”。因此,每次视频结束时,我必须手动转到播放列表,然后单击“下一步”链接。
有什么方法可以自动完成这个任务吗?SOmething喜欢:
1.go to this page
2.select the active item in the list(which contains the video duration)
3.extract the video duration from the active item and let the video play
4.After video duration, ex: 4min, click on the next element of the list and let it play for the video duration...
...我可以使用python和jquery。使用google控制台可以实现这一点吗?或者我能运行的任何外部脚本?我也见过Imacros,但是它记录了特定的itens,我需要一些动态/过程。类似于查找活动选定项的下一个元素。
提前谢谢各位。
发布于 2014-01-23 16:04:59
您可以使用硒实现多种浏览器的自动化。
在Python绑定中有用于Selenium的PyPI --您可以在链接的页面上看到一些代码示例,例如:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
browser = webdriver.Firefox()
browser.get('http://www.yahoo.com')
assert 'Yahoo!' in browser.title
elem = browser.find_element_by_name('p') # Find the search box
elem.send_keys('seleniumhq' + Keys.RETURN)
browser.quit()https://stackoverflow.com/questions/21313057
复制相似问题