Advertisement
here2share

# firefox-dta4blacklist.py

Dec 23rd, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # firefox-dta4blacklist.py
  2. zzz='''
  3. '''
  4.  
  5. s=[]
  6. z=zzz.split('<description>')
  7. for v in z:
  8.     for x in ('''http:// https://'''.split()):
  9.         v=v.replace(x,'')
  10.     v=v.split(r'/')[0]
  11.     if v.count('.') > 1: v=v.split('.'); v=v[-2]+'.'+v[-1]
  12.     if v not in s and len(v) < 32: s.append(v)
  13. s.sort()
  14. s.sort(key=lambda x: zzz.count(x))
  15. s.reverse()
  16.  
  17. # for v in s[:50]: print v, zzz.count(v)
  18.  
  19. s='+-'+'+-'.join(s[:10])
  20. print s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement