我在终端上运行以下命令:
firefox https://www.youtube.com/watch?v=TbvhGcf6UJU&feature=youtu.be&t=06m56s
但是,当我运行该命令时,时间范围部分将被截断,并且firefox在此链接处打开:firefox https://www.youtube.com/watch?v=TbvhGcf6UJU
对于所有包含时间范围的视频,似乎都会发生这种情况。这也是我的终端给我的消息:

g_slice_set_config: assertion 'sys_page_size == 0' failed
1429336854750   addons.xpi  WARN    Exception running bootstrap method shutdown on webapps-team@lists.launchpad.net: ReferenceError: sss is not defined (resource://gre/modules/addons/XPIProvider.jsm -> file:///usr/share/mozilla/extensions/%7Bec8030f7-c20a-464f-9b0e-13a3a9e97384%7D/webapps-team@lists.launchpad.net/bootstrap.js:72:4) JS Stack trace: shutdown@resource://gre/modules/addons/XPIProvider.jsm -> file:///usr/share/mozilla/extensions/%7Bec8030f7-c20a-464f-9b0e-13a3a9e97384%7D/webapps-team@bootstrap.js:72:5 < XPI_callBootstrapMethod@XPIProvider.jsm:4305:9 < shutdownObserver@XPIProvider.jsm:1991:13

如何在URL中指定的时间范围内打开firefox?任何线索表示赞赏。

我最终将不得不在python3调用中使用os.system运行此程序。

编辑:我刚刚也检查了google-chrome,而chrome似乎也截断了URL。

最佳答案

您的网址中包含特殊字符。您必须引用或转义它们。

试试这个:

firefox 'https://www.youtube.com/watch?v=TbvhGcf6UJU&feature=youtu.be&t=06m56s'

关于python - 当我从终端运行Firefox时,YouTube URL被截断,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29713584/

10-11 00:53
查看更多