Advertisement
MikiSoft

Untitled

Mar 5th, 2024
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // https://spys.one/en/socks-proxy-list/
  2.  
  3. let rows = document.querySelectorAll('tr.spy1xx, tr.spy1x');
  4. let results = [];
  5.  
  6. // Convert NodeList to Array and skip the first row
  7. rows = Array.from(rows).slice(1);
  8.  
  9. rows.forEach(row => {
  10.   let tdElement = row.querySelector('td');
  11.  
  12.   // Clone the td element and remove all script tags from the clone
  13.   let clone = tdElement.cloneNode(true);
  14.   let scripts = clone.querySelectorAll('script');
  15.   scripts.forEach(script => script.remove());
  16.  
  17.   // Get the text content from the clone
  18.   let textContent = clone.textContent.trim();
  19.  
  20.   results.push(textContent);
  21. });
  22. console.log(results.join('\n'))
  23.  
  24.  
  25. // https://hidemy.io/en/proxy-list/
  26.  
  27. // Find the table
  28. let table = document.querySelector('table');
  29. results = [];
  30.  
  31. // Extract IP:Port from the first two columns of each row
  32. let ipPorts = Array.from(table.querySelectorAll('tr')).slice(1).map(row => {
  33.     let columns = Array.from(row.querySelectorAll('td'));
  34.     if (columns.length >= 2) {
  35.         let ip = columns[0].textContent;
  36.         let port = columns[1].textContent;
  37.         return `${ip}:${port}`;
  38.     }
  39. });
  40.  
  41. // Print the results
  42. ipPorts.forEach(ipPort => {
  43.     if (ipPort) results.push(ipPort);
  44. });
  45. console.log(results.join('\n'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement