我怎样才能自动化“下一集”? Netflix (mac) 中的按钮?
这是我的目标: 当我女儿凌晨 4 点醒来时,我希望能够排队观看接下来的 4 集《小羊肖恩》(20 分钟),这样我就不必每 20 分钟醒来一次来开始下一场演出。所以实际上我只需要每隔 20 分钟左右(或者无论节目多长)自动点击“下一集”按钮。这是针对运行 Snow Leopard 的 MAC 计算机。
我的第一直觉是看看我是否可以启动一些 JavaScript 来做到这一点,但后来注意到 Netflix 使用 Silverlight,并且似乎无法通过 JS 访问“下一集”按钮。
首选方法:
- Chrome 扩展程序
- Mac 自动化工具/脚本/程序
- 独立 Mac 程序
- 任何可行的方法 您
对如何实现这一目标有什么想法,以及哪些工具/方法/脚本可以实现这一目标?
非常感谢。
**更新:我的解决方案**
我能够编写一个 sikuli 脚本来完成此任务。工作起来就像一个魅力。
github上的脚本:
https://github.com/jamischarles/autoplay_net
包含脚本的完整博客文章:
http://www.jamischarles.com/blog/automating-netflix/
Here's my goal:
When my daughter wakes up at 4am I'd like to be able to queue the next 4 episodes of Shaun the Sheep (20 min) so I don't have to wake up every 20 min to start the next show. So really I just need to automate clicking the "next episode" button every 20 min or so (or however long the show is). This is for a MAC computer running Snow Leopard.
My first instinct was to see if I could fire some JavaScript to do that, but then noticed that Netflix uses Silverlight, and it doesn't appear as if the "Next episode" button is accessable via JS.
Preferred methods:
- Chrome extension
- Mac automation tool / scripts / program
- Stand-alone Mac program
- Whatever will work
Any thoughts on how this could be accomplished, and what tools / methods / scripts could accomplish this?
Thank you much.
**Update: My solution **
I was able to write a sikuli script to accomplish just this. Works like a charm.
Script on github:
https://github.com/jamischarles/autoplay_net
Full blog post with the script:
http://www.jamischarles.com/blog/automating-netflix/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,如果你女儿在电脑上观看,并且剧集有标准时间。
此外,如果“下一步”按钮始终出现在一个位置,您可以看看 autohotkey,
这样,您就可以自动执行点击操作,也许还可以执行其他一些操作;
您可以在这里获取自动热键:
http://www.autohotkey.com/
这里有一些文档:
http://www.autohotkey.com/docs/
http://www.autohotkey.com/docs/commands/MouseClick.htm (您的项目需要这个)
这里是示例脚本也模拟在某个位置单击鼠标:
还有@lesce,您的链接不会指向任何有效的应用程序。 (抱歉无法发表评论)
Well, if your daughter watches it on the computer, and the episodes have standard time.
Also if the Next button appears consistently at one spot, you could take a look at autohotkey,
that way, you can automate the clicking, and maybe some other stuff to;
you can get auto hot key here:
http://www.autohotkey.com/
and there is some documentation available here:
http://www.autohotkey.com/docs/
http://www.autohotkey.com/docs/commands/MouseClick.htm (you need this for your project)
Here is a sample script too that simulates a mouse click at a certain location:
also @ lesce, your link doesn't lead to any valid app. (sorry can't comment)
也许 sikuli 能够单击该按钮。
Maybe sikuli would be able to click the button.
您可以使用适用于 Chrome 的 iMacros。 https://chrome.google.com/webstore/detail/cplklnmnlbnpmjogncfgfijoopmnlemp/details
You can use iMacros for Chrome . https://chrome.google.com/webstore/detail/cplklnmnlbnpmjogncfgfijoopmnlemp/details
autoFlix 就是这样做的,但仅限于 Windows。
不过,我一直在开发 Mac 版本。
autoFlix does just this, but only on Windows.
I've been working on a Mac version, though.