-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
137 lines (113 loc) · 3.44 KB
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import pyshorteners
def invalid():
print ("INVALID CHOICE!")
def bitly():
key = input("Enter API key .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key='YOUR_KEY')
result = s.bitly.short(domain)
print(result)
def adfly():
key = input("Enter API Key .. ")
user_id = input("Enter User ID .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key=key, user_id=user_id, type='int')
result = s.adfly.short(site)
print(result)
def chilpit():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.chilpit.short(domain)
print(result)
def clckru():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.clckru.short(domain)
print(result)
def cuttly():
key = input("Enter API Key .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key='YOUR_KEY')
result = s.cuttly.short('http://www.google.com')
print(result)
def dagd():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.dagd.short(domain)
print(result)
def gitio():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.gitio.short(domain)
print(result)
def isgd():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.isgd.short(domain)
print(result)
def nullpointer():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(domain='https://0x0.st')
result = s.nullpointer.short(domain)
print(result)
def osdb():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.osdb.short(domain)
print(result)
def owly():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.owly.short(domain)
print(result)
def post():
key = input("Enter API Key .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key=key)
result = s.post.short(domain)
print(result)
def qpsru():
domain = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.qpsru.short(domain)
print(result)
def shortcm():
key = input("Enter API Key .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key=key)
result = s.shortcm.short(domain)
print(result)
def tinycc():
key = input("Enter API Key .. ")
user = input("Enter username .. ")
domain = input("Enter Site .. ")
s = pyshorteners.Shortener(api_key=key, login=user)
result = s.tinycc.short(domain)
print(result)
def tinyurl():
site = input("Enter Site .. ")
s = pyshorteners.Shortener()
result = s.tinyurl.short(site)
print(result)
if __name__ == '__main__':
menu = {"1":("adf.ly",adfly),
"2":("Bit.ly",bitly),
"3": ("Chilp.it",chilpit),
"4": ("Clck.ru",clckru),
"5": ("Cutt.ly",cuttly),
"6": ("Da.gd",dagd),
"7": ("Git.io", gitio),
"8": ("Is.gd", isgd),
"9": ("NullPointer", nullpointer),
"10": ("Os.db", osdb),
"11": ("Ow.ly", owly),
"12": ("Po.st",post),
"13": ("Qps.ru",qpsru),
"14": ("Short.cm", shortcm),
"15": ("Tiny.cc", tinycc),
"16": ("TinyURL.com",tinyurl)
}
for key in sorted(menu.keys()):
print(key+": " + menu[key][0])
ans = input("Make A Choice.. ")
menu.get(ans,[None,invalid])[1]()