Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // https://spys.one/en/socks-proxy-list/
- let rows = document.querySelectorAll('tr.spy1xx, tr.spy1x');
- let results = [];
- // Convert NodeList to Array and skip the first row
- rows = Array.from(rows).slice(1);
- rows.forEach(row => {
- let tdElement = row.querySelector('td');
- // Clone the td element and remove all script tags from the clone
- let clone = tdElement.cloneNode(true);
- let scripts = clone.querySelectorAll('script');
- scripts.forEach(script => script.remove());
- // Get the text content from the clone
- let textContent = clone.textContent.trim();
- results.push(textContent);
- });
- console.log(results.join('\n'))
- // https://hidemy.io/en/proxy-list/
- // Find the table
- let table = document.querySelector('table');
- results = [];
- // Extract IP:Port from the first two columns of each row
- let ipPorts = Array.from(table.querySelectorAll('tr')).slice(1).map(row => {
- let columns = Array.from(row.querySelectorAll('td'));
- if (columns.length >= 2) {
- let ip = columns[0].textContent;
- let port = columns[1].textContent;
- return `${ip}:${port}`;
- }
- });
- // Print the results
- ipPorts.forEach(ipPort => {
- if (ipPort) results.push(ipPort);
- });
- console.log(results.join('\n'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement