Jenderal92

split

Jan 17th, 2021
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import sys,os
  2. try:
  3. for site in open(sys.argv[1]).read().splitlines():
  4. try:
  5. # if 'google' and 'suspendedpage' in site:continue
  6. # p=site.replace('https://www.google.com/url?sa=t&source=web&rct=j&url=','').split('&')[0]
  7. _p=site.split('/')[0]+'//'+site.split('/')[2]
  8. open('.p','a+').write(_p+'\n')
  9. except:continue
  10. podo=[]
  11. for site2 in open('.p').read().splitlines():
  12. try:
  13. if site2 in podo:continue
  14. else:print site2;podo.append(site2);open('p_'+sys.argv[1],'a+').write(site2+'\n')
  15. except:continue
  16. os.system('rm -rf .p')
  17. print '\nDone saved in p_'+sys.argv[1]
  18. except IndexError:
  19. exit('use : python2 pisah.py list.txt')
  20.  
  21. source : https://github.com/AnonRoz-Team/pisah
Advertisement
Add Comment
Please, Sign In to add comment