-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_credentials.py
More file actions
51 lines (44 loc) · 1.72 KB
/
Copy pathsetup_credentials.py
File metadata and controls
51 lines (44 loc) · 1.72 KB
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
#!/usr/bin/env python3
"""
Credentials setup script for e-commerce sites
"""
from src.utils.credentials import update_credentials, get_credentials
def setup_credentials():
"""Setup login credentials for sites"""
print("🔐 E-commerce Site Credentials Setup")
print("=" * 50)
print("Please provide login credentials for the sites you want to use.")
print("Leave blank to skip a site.")
print()
sites = [
("amazon.com", "Amazon"),
("flipkart.com", "Flipkart"),
("thesouledstore.com", "The Souled Store"),
("bewakoof.com", "Bewakoof"),
("blinkit.com", "Blinkit")
]
for domain, display_name in sites:
print(f"\n📍 {display_name} ({domain})")
print("-" * 30)
username = input(f"Username/Email for {display_name}: ").strip()
if username:
password = input(f"Password for {display_name}: ").strip()
if password:
if update_credentials(domain, username, password):
print(f"✅ Credentials saved for {display_name}")
else:
print(f"❌ Failed to save credentials for {display_name}")
else:
print(f"⏭️ Skipping {display_name} (no password)")
else:
print(f"⏭️ Skipping {display_name} (no username)")
print("\n🎉 Credentials setup complete!")
print("\nConfigured sites:")
for domain, display_name in sites:
creds = get_credentials(domain)
if creds.get("username"):
print(f"✅ {display_name}: {creds['username']}")
else:
print(f"⚪ {display_name}: Not configured")
if __name__ == "__main__":
setup_credentials()