你看下边的js脚本,帮我加上一个提取目标媒体链接的功能,需要提取的html目标链接结构: [code] js脚本结构: [code] 不要改变原先的结构
- User
你看下边的js脚本,帮我加上一个提取目标媒体链接的功能,需要提取的html目标链接结构:
html<meta name="og:video" content="https://sns-video-hw.xhscdn.com/stream/79/110/259/01e8527a8b49da4f0103700397823735ee_259.mp4">js脚本结构:// ==UserScript== // @name media-tracker // @namespace http://tampermonkey.net/ // @version 2025-05-23 // @description try to take over the world! // @author You // @match http://*/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... // Find video and audio elements document.querySelectorAll('video source, audio source').forEach(source => { console.log('Media source URL:', source.src); }); // Find media file links (common media extensions) document.querySelectorAll('a[href]').forEach(link => { const href = link.href.toLowerCase(); if(href.match(/\.(mp4|mp3|wav|ogg|webm|m4v)$/)) { console.log('Media link:', link.href); } }); // Find elements with media source attributes document.querySelectorAll('[src]').forEach(el => { const src = el.src.toLowerCase(); if(src.match(/\.(mp4|mp3|wav|ogg|webm|m4v)$/)) { console.log('Media element source:', el.src); } }); })();不要改变原先的结构
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.