-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccount_setup.py
More file actions
36 lines (26 loc) · 897 Bytes
/
account_setup.py
File metadata and controls
36 lines (26 loc) · 897 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
27
28
29
30
31
32
33
34
35
36
import sqlite3
from getpass import getpass
conn = sqlite3.connect('auto-insta.db')
print("Do not insert email for login, please use user_id")
user_id = input("Insert user_id:")
passwd = getpass("Insert Password:")
conn.execute("DELETE from creds")
conn.execute('''INSERT INTO creds (user_id,passwd)
VALUES("{}","{}")
'''.format(user_id, passwd))
print("credentials have been udpated")
print('Do you want to update "Chrome Data Location"')
how_to = """
*****How to Find Path Location:*******
1. Open chrome
2. open Link/URL "chrome://version/"
3. copy "Profile Path"
4. paste here
"""
if input("press y or n:-").lower() == 'y':
print(how_to)
path_loc = input("Path Location:")
conn.execute('UPDATE creds SET chromedata="{}" where user_id="{}"'.format(
path_loc.replace("/", "//"), user_id))
print("Chrome Location has been Updated")
conn.commit()