从浏览器的网络控制台获取信息 [英] Get information from the browser's network console
问题描述
我想通过JavaScript或其他语言访问浏览器的网络控制台输出。
$ b
下面是Youtube上Firefox网络控制台的屏幕截图: / em>
我只想检索浏览器的每一个网址,如果可能的话(在Firefox中使用Firefox Scratchpad插入我的脚本)。 >
谢谢。
编辑:有关我的项目的更多信息
我想下载由网站生成的文本到语音样本的集合。但我不想使用他们的API,因为我知道究竟需要多少样本(数量在300以上,所以我不想手动)。
由于安全原因,通过在浏览器中使用普通的JS脚本将无法访问此Firefox面板。但另一种方法(Google Chrome)则是在Chrome地址栏中输入 chrome:// net-internals /#events
。这将打开网络监视器。在那里你可以直接在控制台上键入Ctrl + Shift + J或者Cmd + Option + J(在Mac OS上),并直接访问所有HTTP事件。
I want to access my browser's network console output via JavaScript or maybe another language.
Here is a screenshot of the Firefox network console on Youtube:
I just want to retrieve every URL my browser GETs, and do it in JavaScript, if possible (I insert my scripts in the page using the Firefox Scratchpad).
Thank you.
Edit: A bit more information about my project
I want to download a collection of "text to speech" samples generated by a website. But I don't want to use their API, because I know exactly how much samples I need (the number is above 300, so I don't want to do it manually).
By using a normal JS script inside your browser won't give you access to this Firefox Panel, due to security reasons. But an alternative (For Google Chrome) is to type chrome://net-internals/#events
in the Chrome address bar. This will open the Network Monitor. There you can type Ctrl+Shift+J or Cmd+Option+J (On Mac OS) and gain access to all HTTP events with JavaScript directly in the console.
这篇关于从浏览器的网络控制台获取信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!