Guest User

Untitled

a guest
Nov 27th, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function collectURLs() {
  2.         const urls = new Set();
  3.  
  4.         // Collect from .fileText elements
  5.         document.querySelectorAll('.fileText').forEach(el => {
  6.             const link = el.querySelector('a')?.href;
  7.             if (link) urls.add(link);
  8.         });
  9.  
  10.         // Collect from <a> elements with the specific domains
  11.         document.querySelectorAll('a').forEach(a => {
  12.             const href = a.href;
  13.             if (/https?:\/\/(files|litter)\.catbox\.moe\//.test(href)) {
  14.                 urls.add(href);
  15.             }
  16.         });
  17.  
  18.         return Array.from(urls);
  19.     }
  20.  
Add Comment
Please, Sign In to add comment