detect requests calls in a url similar to network in chrome dev tools

4k views Asked by At

I don't know if what I am looking for is possible, I want JS, or any other programming method solution to detect the requests calls for a given url page, something similar to chrome dev tools

enter image description here

There is a site that displays videos, I would like to access through the video page url the playlist url, I inspected the source page but I haven't found it, it's been loaded after 4 -6 secs after the page is loaded, I could only find it in the chrome dev tools, under Network tab.

Note: Internet download manager & other firefox plugin could detect the playlist url. It should be some way of doing it.

Edited: I am open to develop chrome extension to capture the playlist link, similar to IDM chrome extension work.

1

There are 1 answers

0
Kamal On BEST ANSWER

I could do it using webRequest in chrome extension. I added this code in the background.js and it worked.

chrome.webRequest.onCompleted.addListener(function(details) {
    var extension = details.url.split('.').pop();
    if(extension == 'm3u8' ){
        console.debug(details.url);
    }

}, {
    urls: ["<all_urls>"]
});