Skip to content

Get all network requests in a website and download files and videos from it

License

Notifications You must be signed in to change notification settings

myh2910/network-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon Network Tracker

A Chrome extension to get all network requests in a website and download files and videos from it.

Screenshot

Configuration

In sanitizeURL function at background.js:

function sanitizeURL(url) {
  ...
  if (url.match(/googleusercontent\.com\/.*&url=.*/g)) {
    return Array.from(
      url.matchAll(/googleusercontent\.com\/.*&url=(.*)/g)
    )[0][1];
  }
  ...
  return url;
}

In matchURL function at background.js:

function matchURL(data) {
  ...
  if (data.tabURL.match(/https?:\/\/www\.example\.com/g)) {
    return (
      (data.mimeType && (
        data.mimeType === "application/vnd.apple.mpegurl" ||
          data.mimeType.match(/^(video|audio)/g))) ||
      data.url.match(/^(?!.*\bthumbnails\.vtt\b).*\.(m3u8|aaa|ts|vtt|srt)\b/g) ||
      data.url.match(/\bmaster\.txt\b/g)
    );
  }
  ...
  return false;
}

In matchPlaylistURL function at background.js:

function matchPlaylistURL(data) {
  ...
  if (data.tabURL.match(/https?:\/\/www\.example\.com/g)) {
    return (
      data.mimeType === "application/vnd.apple.mpegurl" ||
      data.url.includes("master.txt") ||
      data.url.includes(".m3u8") ||
      data.url.includes("/m3/")
    );
  }
  ...
  return false;
}

Sources

About

Get all network requests in a website and download files and videos from it

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages