node.js - puppeteer - how to intercept requests and responses only from a certain url in nodejs
问题描述
I'm using puppeteer to automatize spotify login and tracks search and play from a node cli script. since I'm intercepting requests, I want to log only the urls like the one above
https://audio-akp-quic-control-spotify-com.akamaized.net/audio/cb8daa71ccc075db7c559871bdc4?__token__=exp=1614258319~hmac=30c6d8c5676fb472ec33fd5c8ca6331ee756daf9f69096e214
Usually in a chrome extension I can use a glob to target only the desired url for example: https://audio-akp-quic-control-spotify-com.akamaized.net/audio/*
, how I can achive the same result in node and log only the request / responses from the urls I need?
解决方案
推荐阅读
- android - 没有可用的缓冲区空间(达到最大连接数?):绑定
- python-3.x - 在 Python 3 中使用 For If 语句删除字典键
- java - 在java中如何捕获从子线程抛出的异常,然后从父线程再次抛出它
- sdl - 应用程序中的插值导致精灵抖动
- javascript - (Angular) 在 Bootstrap 模式中访问 Typescript 对象
- php - PHP regexp 如何在 preg_match 中获取所有匹配项
- java - java8按自定义值分组自定义地图值
- angular5 - PrimeNg TurboTable colgroup 动态 colspan
- css - 如何创建完整的背景图像
- vba - VBA 脚本导致 Excel 在 15 次循环后没有响应