- Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathgithub_srch.py
More file actions
Latest commit
27 lines (22 loc) · 718 Bytes
/
Copy pathgithub_srch.py
File metadata and controls
27 lines (22 loc) · 718 Bytes
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
#!usr/bin/python
importwebbrowser
defoption_type(option):
return {
1 : "Repositories",
2 : "Code",
3 : "Commits",
4 : "Issues",
5 : "Users"
}[option]
#taking search input from user
search_input=input("what do you want to search: ")
option_input=input("please select an option: \n 1) Repositories [Default] \n 2) Code \n 3) Commits \n 4) Issues \n 5) Users \n")
#If option_input is empty use the default one
if(option_input==""):
option="Repositories"
else:
option=option_type(int(option_input))
print("Plz Wait github is about to open!!!!")
#adding strings
z="https://github.com/search?q=",search_input,"&type=",option
webbrowser.open_new_tab(''.join(z))