Skip to content

Commit

Permalink
Release v1.0.3 (#66)
Browse files Browse the repository at this point in the history
Release v1.0.3

Bug Fixes
    🐛 Fix bug when you have no followers/following
    🐛 Fix bug with filtering
    🐛 Fix bug when user has a shop button
    🐛 Fix bug where you would follow someone back if they already followed you
    🐛 Fix bug where hashtag could not be found on compact screens
    🐛 Fix bug with unfollow confirmation screen in new UI and simplifies check
    🐛 Fix bug when there is no like button on screen
Improvements
    ✅ Combine black and pyflakes into one workflow
    :neckbeard: Unfollow supports range now
    :neckbeard: Improve clicking and double clicking function
    :neckbeard: Add ability to “small swipe” in case you only need to swipe a little
    🐈 Add argument logging for better debugging
    🐈 Add click location for better debugging
    🐈 Clean up logging
    📝 Clean remains of remove-mass-followers. This may be added back at some point
New Features
    🎁 Add update checking
    🎁 Add example filter file
    🎁 Add (disabled) debugging plugin

Co-authored-by: Philip Ulrich <[email protected]>
Co-authored-by: narkopolo <[email protected]>
Co-authored-by: Arthur Silva <[email protected]>
Co-authored-by: Alessandro Maggio <[email protected]>
Co-authored-by: Dennis <[email protected]>
  • Loading branch information
5 people authored Nov 17, 2020
1 parent 233133d commit 67cded7
Show file tree
Hide file tree
Showing 23 changed files with 792 additions and 307 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/black.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/code-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: code-checker

on:
push:
# only build each push to develop and master, other branches are built through pull requests
branches: [develop, master]
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '>=3.6'

- name: Run black
uses: psf/black@stable

static-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- name: Clone Repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Pyflakes
run: |
pip3 install --upgrade pip
pip3 install pyflakes
- name: Detect errors with pyflakes
run: pyflakes .
13 changes: 0 additions & 13 deletions .github/workflows/pyflakes.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ screenshots
crashes
filter.json
whitelist.txt
Pipfile
Pipfile.lock
*.pdf
.venv
31 changes: 22 additions & 9 deletions GramAddict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@
close_instagram,
get_instagram_version,
get_value,
get_version,
open_instagram,
save_crash,
screen_sleep,
update_available,
)
from GramAddict.core.views import TabBarView
from GramAddict.version import __version__

# Logging initialization
configure_logger()
logger = logging.getLogger(__name__)
if update_available():
logger.warn(
"NOTICE: There is an update available. Please update so that you can get all the latest features and bugfixes. https://github.com/GramAddict/bot"
)
logger.info(
"GramAddict " + get_version(), extra={"color": f"{Style.BRIGHT}{Fore.MAGENTA}"}
f"GramAddict {__version__}", extra={"color": f"{Style.BRIGHT}{Fore.MAGENTA}"}
)


# Global Variables
device_id = None
plugins = PluginLoader("GramAddict.plugins").plugins
Expand All @@ -50,9 +56,7 @@ def load_plugins():
action = arg.get("action", None)
if action:
parser.add_argument(
arg["arg"],
help=arg["help"],
action=arg.get("action", None),
arg["arg"], help=arg["help"], action=arg.get("action", None)
)
else:
parser.add_argument(
Expand All @@ -72,6 +76,7 @@ def load_plugins():


def get_args():
logger.debug(f"Arguments used: {' '.join(sys.argv[1:])}")
if not len(sys.argv) > 1:
parser.print_help()
return False
Expand Down Expand Up @@ -131,8 +136,10 @@ def run():
return
logger.info("Instagram version: " + get_instagram_version())
device = create_device(device_id)

if device is None:
return

while True:
logger.info(
"-------- START: " + str(session_state.startTime) + " --------",
Expand Down Expand Up @@ -163,11 +170,17 @@ def run():
) = profileView.getProfileInfo()

if (
not session_state.my_username
or not session_state.my_followers_count
or not session_state.my_following_count
session_state.my_username == None
or session_state.my_followers_count == None
or session_state.my_following_count == None
):
logger.critical("Could not get profile info")
logger.critical(
"Could not get one of the following from your profile: username, # of followers, # of followings. This is typically due to a soft ban. Review the crash screenshot to see if this is the case."
)
logger.critical(
f"Username: {getattr(session_state,'my_username')}, Followers: {getattr(session_state,'my_followers_count')}, Following: {getattr(session_state,'my_following_count')}"
)
save_crash(device)
exit(1)

username = session_state.my_username
Expand Down
6 changes: 5 additions & 1 deletion GramAddict/core/decorators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import sys
import traceback
from colorama import Fore, Style
from datetime import datetime
from http.client import HTTPException
from socket import timeout
Expand All @@ -26,7 +27,10 @@ def wrapper(*args, **kwargs):
func(*args, **kwargs)
except KeyboardInterrupt:
close_instagram(device_id)
logger.warn(f"-------- FINISH: {datetime.now().time()} --------")
logger.info(
f"-------- FINISH: {datetime.now().time()} --------",
extra={"color": f"{Style.BRIGHT}{Fore.YELLOW}"},
)
print_full_report(sessions)
sessions.persist(directory=session_state.my_username)
sys.exit(0)
Expand Down
Loading

0 comments on commit 67cded7

Please sign in to comment.