today.isangjeong/app/library/init-auth.py
2024-11-06 22:57:35 +09:00

23 lines
No EOL
560 B
Python

import library.vts as vts
vts.download(vts.get_board())
from instagrapi import Client
import json, os
import time
with open('../config.json') as json_file:
json_data = json.load(json_file)
ROOT = json_data['ROOT']
INSTAGRAM_AUTH = [json_data['INSTAGRAM_ID'], json_data['INSTAGRAM_PASSWORD']]
cl = Client()
cl.login(INSTAGRAM_AUTH[0], INSTAGRAM_AUTH[1])
json.dump(
cl.get_settings(),
open(f'{ROOT}temp/cookies.json', 'w')
)
print("🍪 | Account information was successfully retrieved.")
print(f"📅 | Job ended at {time.time()}")