From c529654eb6f8b1ec046608ec9536ea07cf7da02a Mon Sep 17 00:00:00 2001 From: array-in-a-matrix Date: Sat, 9 Oct 2021 23:30:58 -0400 Subject: [PATCH] random stuff idk --- README.md | 7 +++++-- default_login.json | 5 +++++ logger.py | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 default_login.json diff --git a/README.md b/README.md index 157afda..f1fff09 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # insta-logger -This is a selenium based bot that logs instagram direct messages. -currently the bot is very limited (some things are hard coded) because I am still figuring things out. \ No newline at end of file +This is a selenium based bot that logs instagram direct messages. currently the bot is very limited (some things are hard coded) because I am still figuring things out. A graphical user interface (GUI) built using the `tkinter` library is planned, however, no effort has been put towards it yet. + +# How to use + +currently you will need to rename `default_login.json` to `login.json` then replace the fields with required info. For `private` add `Yes` if you are logging a 1 to 1 direct message, however if you are logging a group chat then add `No`. You can use true or false instead if you desire. \ No newline at end of file diff --git a/default_login.json b/default_login.json new file mode 100644 index 0000000..1a43afd --- /dev/null +++ b/default_login.json @@ -0,0 +1,5 @@ +{ + "username": "______", + "password": "______", + "private": "______" +} \ No newline at end of file diff --git a/logger.py b/logger.py index 7dd2de3..3ccfc20 100644 --- a/logger.py +++ b/logger.py @@ -15,9 +15,9 @@ private = json_object['private'] # get account credentials from json file # are we loging a private chat or a group chat? -if private == "Yes": +if private == "Yes" or str.lower(private) == "true": private = True -elif private == "No": +elif private == "No" or str.lower(private) == "false": private = False browser = webdriver.Firefox()