-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathurl.py
28 lines (23 loc) · 819 Bytes
/
url.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! usr/bin/env python
#coding = UTF-8
import os
import re
print '''
==================================================================
= By: Barrett =
= QQ: 2463917215 =
= Oursite:bbs.blackbap.org =
==================================================================
'''
if __name__ == '__main__':
try:
url = open('url.txt', 'r')
except:
print 'you do not have the file url.txt'
else:
tmp = [tmp.split('?')[0] for tmp in url]
tmp = {}.fromkeys(tmp).keys()
nex = '\n'
result = open('result.txt', 'w')
result.write(nex.join(tmp))
result.close()