Automatize HAR files generation from Google Chrome

后端 未结 2 1347
無奈伤痛
無奈伤痛 2021-01-30 14:37

Basically what I need is a way to automatize the result of the following operations:

  1. open a new tab;

  2. open the Network tab in the develo

2条回答
  •  孤独总比滥情好
    2021-01-30 15:06

    By now there's a browser plugin to do that: https://github.com/devtools-html/har-export-trigger

    It uses the WebExtensions DevTools API and I got it to work with both Firefox and Chrome.

    See my code for Chrome here: https://github.com/theri/web-measurement-tools/blob/master/load/load_url_using_chrome.py#L175

    Automatically installing the plugin in Chrome is a bit more complicated than in Firefox, but feasible - I extracted the plugin archive locally and then link to it in chrome_prefs.json (see same repository).

提交回复
热议问题