ToKeiChun

webstatsdomain.org Domain Grabber

Nov 17th, 2022 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.33 KB | None | 0 0
  1. import sys
  2. import os, re, requests
  3. from multiprocessing.dummy import Pool as ThreadPool
  4. from time import time as timer
  5. import json
  6. from multiprocessing import Pool
  7. from concurrent.futures import ThreadPoolExecutor
  8. import requests, re, sys, threading, json
  9. import threading
  10. from multiprocessing.dummy import Pool
  11. from queue import Queue
  12.  
  13.  
  14. def kentot(site):
  15.     try:
  16.         page = 1
  17.         while True:
  18.             url2 = ('{}{}.xml' .format(site,page) )
  19.             tai = requests.get(url2)
  20.             toket = tai.url
  21.             if toket == site:
  22.                 print('Done Scraping ... ')
  23.                 exit()
  24.             else:
  25.                 m = requests.get(url2).text
  26.                 memek = re.findall(r'https://webstatsdomain.org/d/(.*?)</loc>', m)
  27.                 page += 1
  28.                 print("")
  29.                 print("Scraping page {} ...  " .format(page))
  30.                 print("")
  31.                 for ye in memek:
  32.                     kontol = ye.strip()
  33.                     print(kontol)
  34.                     open('DOMAINRESULT.txt', 'a').write('http://'+kontol+'\n')
  35.     except Exception as e:
  36.         pass
  37.  
  38.  
  39. if __name__ == '__main__':
  40.     """
  41.     try:
  42.         mmc = "web.txt"
  43.         a = open(mmc, 'r').read().splitlines()
  44.         p = Pool(50)
  45.         p.map(kentot, a)
  46.         p.close()
  47.         p.join()
  48.     except Exception as e:
  49.         print(e)
  50.     """
  51.     os.system('cls' if os.name == 'nt' else 'clear')
  52.     thread= input(' Thread : ')
  53.     a = 'https://webstatsdomain.org/sitemap-'.splitlines()
  54.     ThreadPool = Pool(int(thread))
  55.     Threads = ThreadPool.map(kentot, a)
  56.    
  57.    
Add Comment
Please, Sign In to add comment