Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Update to v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Mishchenko committed Nov 30, 2020
1 parent 51ae217 commit 5ed9f86
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- [Source code](#source-code)
- [Filtering](#filtering)
- [Whitelist and Blacklist](#whitelist-and-blacklist)
- [Targets Interaction](#targets-interaction)
- [Analytics](#analytics)
- [Features in progress](#features-in-progress)
- [Why Insomniac?](#why-insomniac)
Expand Down
2 changes: 1 addition & 1 deletion insomniac/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__title__ = 'insomniac'
__description__ = 'Simple Instagram bot for automated Instagram interaction using Android.'
__url__ = 'https://github.com/alexal1/Insomniac/'
__version__ = '3.4.0'
__version__ = '3.4.1'
__debug_mode__ = False
__author__ = 'Insomniac Team'
__author_email__ = 'info@insomniac-bot.com'
Expand Down
4 changes: 3 additions & 1 deletion insomniac/action_handle_hashtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ def extract_hashtag_profiles_and_interact(device,

# Open first post
print("Opening the first post")
# Index 1 is reserved for hot Reels by this tag
first_post_index = 2 if instructions == HashtagInteractionType.TOP_LIKERS else 1
first_post_view = device.find(resourceId='com.instagram.android:id/image_button',
className='android.widget.ImageView',
index=1)
index=first_post_index)
first_post_view.click()
sleeper.random_sleep()

Expand Down
2 changes: 1 addition & 1 deletion insomniac/limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def is_reached_for_action(self, action, session_state):
return False

initial_following = session_state.my_following_count
followed_count = session_state.sum(session_state.totalFollowed.values())
followed_count = sum(session_state.totalFollowed.values())

return initial_following + followed_count >= self.max_following_limit

Expand Down
6 changes: 3 additions & 3 deletions insomniac/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,19 @@ def run(self):
self.session_state,
self.on_action_callback,
self.limits_mgr.is_limit_reached_for_action)

self.end_session(device_wrapper)
except ActionBlockedError as ex:
print_timeless("")
print_timeless(COLOR_FAIL + str(ex) + COLOR_ENDC)
self.end_session(device_wrapper)
return
except Exception as ex:
if __debug_mode__:
raise ex
else:
print_timeless(COLOR_FAIL + f"\nCaught an exception:\n{ex}" + COLOR_ENDC)
save_crash(device_wrapper.get(), ex)


self.end_session(device_wrapper)
if self.repeat is not None:
self.repeat_session(args)
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ uiautomator2
uiautomator
colorama
croniter
speedtest
speedtest-cli

0 comments on commit 5ed9f86

Please sign in to comment.