使用Python控制嵌入到网站Flash播放器中?

时间:2021-11-27 19:00:52

I am trying to write few simple python scripts, which will allow me to control one of the Internet radio (which I listen) with an keybinded python scripts.

我正在尝试编写一些简单的python脚本,这将允许我使用键绑定的python脚本控制其中一个Internet广播(我听)。

I am now able to connect and log into the website, I am able to get out the song data ( that is - all the data which are passed to the player).

我现在能够连接并登录网站,我能够得到歌曲数据(即 - 传递给播放器的所有数据)。

I noticed, that the player is controlled with javascript, lets assume, that it's address is http://www.sitesite.com/player.swf

我注意到,播放器是用javascript控制的,我们假设它的地址是http://www.sitesite.com/player.swf

If the player can be controlled with javascript, then I think that there should be an way, to control it with python. If I am right, can someone please give me an example how can this be done?

如果玩家可以用javascript控制,那么我认为应该有一种方法,用python来控制它。如果我是对的,有人可以举个例子说明如何做到这一点?

1 个解决方案

#1


No you can't control the player with Python, flash and javascript can talk to each other because of how the Flash player works when embedded in a web page. Sounds like you're circumventing the flash player anyhow, so why do you need to control a player you're not using?

不,你不能用Python控制播放器,flash和javascript可以互相交谈,因为Flash Player在嵌入网页时的工作原理。听起来你无论如何都在绕过flash播放器,所以为什么你需要控制你不使用的播放器呢?

#1


No you can't control the player with Python, flash and javascript can talk to each other because of how the Flash player works when embedded in a web page. Sounds like you're circumventing the flash player anyhow, so why do you need to control a player you're not using?

不,你不能用Python控制播放器,flash和javascript可以互相交谈,因为Flash Player在嵌入网页时的工作原理。听起来你无论如何都在绕过flash播放器,所以为什么你需要控制你不使用的播放器呢?