-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhosgone.py
33 lines (24 loc) · 928 Bytes
/
whosgone.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
'''
Copyright (c) 2023, Nicholas Maodus
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
'''
from whosgone.utils import IGExtractor
from whosgone.core.output import TextOutput, HTMLOutput
from whosgone.core import settings
import os
if __name__ == "__main__":
settings.initialize()
zip_path = input("Please enter the file path for your instagram data file: ")
while not os.path.exists(zip_path) or not zip_path.endswith(".zip"):
zip_path = input("Input was invalid, please try again: ")
igextract = IGExtractor(zip_path)
followers = igextract.get_followers()
following = igextract.get_following()
output = None
if settings.use_html():
output = HTMLOutput(followers, following)
else:
output = TextOutput(followers, following)
output.create_output()