generated from aaryanrr/Template-Repo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.py
41 lines (35 loc) · 1003 Bytes
/
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
from src.Scraper import URLInstance, menu, check_connection
# Checking the Internet Connection on Startup
print("Checking Internet Connection..")
check_connection()
name = input("Enter the Name of the Service: ")
# Creating the Instance
instance = URLInstance(name)
# Checking is the entered string is blank
if not name:
print("Blank Name!")
quit()
else:
pass
# Showing the Menu and Processing the Input
menu()
while True:
option = int(input("Enter the Option Number: "))
if option == 1:
instance.get_status()
elif option == 2:
instance.open_url()
elif option == 3:
instance.get_url()
elif option == 4:
instance.get_base_url()
elif option == 5:
name = input("Enter the Name of the Service: ")
# Overwriting the Previous Instance Object
instance = URLInstance(name)
menu()
elif option == 6:
print("Thanks for Using!")
quit()
else:
print("Please Enter Valid Value!")