Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/453.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从HTML元素捕获文本值_Javascript_Html_Video_Jmeter - Fatal编程技术网

Javascript 从HTML元素捕获文本值

Javascript 从HTML元素捕获文本值,javascript,html,video,jmeter,Javascript,Html,Video,Jmeter,我的网站包含一个视频(视频是静态图像)。它要求用户只需单击并播放它 我想用JMeter创建一个脚本,录制后我看到 动态时间戳(1601912284332) sessionId(如“c8cd4be84b74b7c2975ece1d”) 带宽等 如下代码所示: <html> <head></head> <body> #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=513000,RESO

我的网站包含一个视频(视频是静态图像)。它要求用户只需单击并播放它

我想用JMeter创建一个脚本,录制后我看到

  • 动态时间戳(1601912284332)
  • sessionId(如“c8cd4be84b74b7c2975ece1d”)
  • 带宽等
如下代码所示:

<html>
<head></head>
<body>
       #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=513000,RESOLUTION=480x270 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177603809001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=795000,RESOLUTION=640x360 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177605145001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=995000,RESOLUTION=640x360 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177601971001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1295000,RESOLUTION=960x540 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177603812001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1826000,RESOLUTION=960x540 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177599739001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2126000,RESOLUTION=1280x720 https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177601975001&amp;secure=true&amp;pubId=2421677124001&amp;videoId=6177599447001 
</body>
</html>

#EXTM3U#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=513000,分辨率=480x270https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177603809001&安全=真实&;pubId=2421677124001&;videoId=6177599447001#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=795000,分辨率=640x360https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177605145001&安全=真实&;pubId=2421677124001&;videoId=6177599447001#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=995000,分辨率=640x360https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177601971001&安全=真实&;pubId=2421677124001&;videoId=6177599447001#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=1295000,分辨率=960x540https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177603812001&安全=真实&;pubId=2421677124001&;videoId=6177599447001#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=1826000,分辨率=960x540https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177599739001&安全=真实&;pubId=2421677124001&;videoId=6177599447001#EXT-X-STREAM-INF:PROGRAM-ID=1,带宽=2126000,分辨率=1280x720https://secure.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=6177601975001&安全=真实&;pubId=2421677124001&;videoId=6177599447001
有人可以帮助我如何继续捕获这些值吗?

您需要通过提取所需视频纵横比的播放列表(或使用随机播放列表),一旦将其存储到JMeter变量中,您可以将此变量“馈送”到(可以使用

HLS插件将为你做所有的“魔术”,比如解析播放列表,获取视频/音频流,然后像真正的用户一样在真正的浏览器中下载它们


更多信息:

您需要研究
从HMTL元素中提取文本。
一个例子:我认为问题不在于提取文本,而是解析字符串以拆分值。