Skip to content

Commit

Permalink
Merge pull request #356 from GramAddict/master
Browse files Browse the repository at this point in the history
update develop branch
  • Loading branch information
mastrolube authored Jan 12, 2024
2 parents 64dc49a + 3d0b8a3 commit 8af7319
Show file tree
Hide file tree
Showing 49 changed files with 3,307 additions and 2,108 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/code-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,29 @@ on:
# only build each push to develop and master, other branches are built through pull requests
branches: [develop, master]
pull_request:
workflow_dispatch:
inputs:
run-lint:
description: 'Run lint job'
required: false
default: true
type: boolean
run-static-check:
description: 'Run static-check job'
required: false
default: true
type: boolean

jobs:
lint:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.run-lint == 'true' || github.event_name == 'push' }}
steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

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

Expand All @@ -23,16 +36,17 @@ jobs:

static-check:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.run-static-check == 'true' || github.event_name == 'push' }}
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Clone Repository
uses: actions/checkout@v2

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

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to PyPI on Release
on:
release:
types:
- created
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install Flit
run: pip install flit

- name: Build and Publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
flit build
flit publish
240 changes: 236 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,228 @@
# Changelog
## 3.2.7 (2023-09-30)
### Fix
- using the monkey approach until this bug is fixed https://github.com/openatx/atx-agent/pull/111
## 3.2.6 (2023-09-28)
### Fix
- get rid of Activity class when starting app
## 3.2.5 (2023-07-23)
### Fix
- account selection with the little arrow instead of clicking on the account name
### Others
- display a warning if the user tries to use an untested version of IG
## 3.2.4 (2023-04-07)
### Fix
- fix selecting account if you have a lof of them, and it's not visible
- screen timeout checking for 'always on devices' (for example emulators)
### Others
- config loader in 'extra' folder
## 3.2.3 (2022-06-23)
### Others
- allow to pass device to dump
- allot to don't to kill the demon while dumping
## 3.2.2 (2022-04-28)
### Fix
- deprecated method uiautomator2 side that cause that error:
>AttributeError: 'Session or Device' object has no attribute '_is_alive'
## 3.2.1 (2022-03-25)
### Fix
- default value for `unfollow-delay` was an integer instead of a string
- story_watcher returned Optional\[Union\[bool, int]] instead of int
## 3.2.0 (2022-03-23)
### New Features
- `unfollow` and `unfollow-non-followers` now check for when you last interacted with each user. Using the argument `unfollow-delay` you can specify the number of days that have to have passed since the last interaction
- after watching a story, the bot will now like it
- with `count-app-crashes` you can tell the bot to count app crashes as a crash for `total-crashes-limit` (default False)
- using the argument `remove-followers-from-file`, the bot can now remove followers following you from a *.txt
### Fix
- when interacting with the last picture of a profile, the bot could crash
- following suggested people instead of target account
- missing block detection for full screen mode (video)
- profile is loaded false negative
- avoid re-watching content if like fails
### Performance improvements
- new way to search for targets in search menu
- no need to see limits for PM if you're not sending them
- code has been cleaned and some functions have been merged
- inspect current view for list of users, this will avoid pressing on bottom bar
- set the screen timeout to 5 minutes if it's less than this value to avoid screen off issues
- store the target source in json instead of a duplicate of the username
- store request and followed status in json (it uses to be only followed)
- using `app_current` instead `info` for checking if the app is opened
- check for crash dialog when app crashes
- check if it's a live video before opening a story
- for actions with files (`interact-from-file`, `unfollow-form-file` and `remove-followers-from-file`) the script will look inside your account folder and no longer where you start the bot from
### Others
- bump version of UIA2
- trim logs in crash reports
- put your username inside the config when creating it with `gramaddict init username`
- default value for `can-reinteract-after` is now "None" instead of "-1"
- better logs when skipping profiles
## 3.1.5 (2022-02-07)
### Fix
- `app_id` was None for them who used the tool in a fancy way (without using config files)
## 3.1.4 (2022-02-07)
### Fix
- avoid a problem with `check_if_crash_popup_is_there` and `choose_cloned_app` being decorated before starting IG
## 3.1.3 (2022-02-06)
### Fix
- missing parenthesis in calling a method
## 3.1.2 (2022-02-06)
### Fix
- find the profile icon even with the different interface
- wrong arguments for stop_bot function
- workaround for avoiding story watching crash due to a bug of UIA2
### Performance improvements
- check if IG is opened when we try to find an element, raise an exception if it's not true (I used a decorator, for fun :D)
- simplify some functions
### Others
- move close_keyboard method to universal class
- a lot of typos
- some types hint
## 3.1.1 (2022-02-01)
### Fix
- inconsistent way to store datetime in json
## 3.1.0 (2022-01-31)
### New Features
- new argument `dont-type` allows writing text by pasting it instead of typing it
- you can go next line in your PM by adding `\n` in the text
### Fix
- the bot wasn't able to confirm the like if the button was not visible in the view
### Others
- don't show countdown in debug mode
## 3.0.5 (2022-01-26)
### Fix
- avoid pressing on music tab instead of hashtags (this bug was only for small screens)
### Others
- the bot restarts after a crash, except for some scenarios that will be highlighted
## 3.0.4 (2022-01-17)
### Fix
- carousel mid-point calculation was wrong (typo)
## 3.0.3 (2022-01-17)
### Fix
- in the new version (217..) the element for sorting following list has changed
### Performance improvements
- better info when min-following is used in unfollow actions, or you're trying to unfollow more people than the number you're following
- handle of malformed data in telegram-reports
## 3.0.2 (2022-01-10)
### Fix
- "back" in "Follow Back" is not uppercase anymore
### Performance improvements
- better handling for not loaded profiles
## 3.0.1 (2022-01-05)
### Fix
- missing argument in analytics report

### Others
- new logo for the readme.md
- added some useful info for the user

## 3.0.0 (2022-01-05)
### New Features

- use the cloned app instead the official, if the dialog box get displayed (this is currently supporter for MIUI devices)
- new filter options: *interact_if_public* and *interact_if_private*
- *interact_only_private* has been removed, delete it from your filters.yml

### Performance improvements

- limit check was wrong in interact_blogger plugin
- feed job was ignoring limits
- don't throw an error if config files \*.yaml instead of \*.yml are used
- likes_limit was referring to total_likes_limit and not current_likes_limit (that caused an error if you specify an interval)

### Performance improvements

- jobs have been split in "active-" and "unfollow-" jobs. That means, for example, that the bot won't stop the activity if it reached the likes limit, and you scheduled to unfollow.
- you can pass how many users have to be processed when working with \*.text (unfollow-from-list and interact-from-list)
- bot flow improved
- feed job improvements
- looking for description improvements
- better handle of empty biographies
- showing session ending conditions at bot start
- countdown before starting, so you can check that everything is ok (filters and ending conditions)
- before starting, the bot will tell you the filters you are going to use (there is no spell check there, if you wrote them wrong they will be displayed there but not get considered)
- disable head notifications while the bot is running
- removed unnecessary argument in check_limit function
- removed some unnecessary classes in story view
- move Filter instance outside of plugins
## 2.10.6 (2021-11-24)

#### Performance improvements

* the parsing of the number of posts / followers / following could fail for someone

Full set of changes: [`2.10.4...2.10.6`](https://github.com/GramAddict/bot/compare/2.10.4...2.10.6)
## 2.10.5 (2021-11-18)

#### Fixes

* 'NoneType' object has no attribute '_is_post_liked'
#### Others

* removed a typo

Full set of changes: [`2.10.4...2.10.5`](https://github.com/GramAddict/bot/compare/2.10.4...2.10.5)

## 2.10.4 (2021-11-08)

#### Fixes

* scraped is now counted as successful interaction

Full set of changes: [`2.10.3...2.10.4`](https://github.com/GramAddict/bot/compare/2.10.3...2.10.4)

## 2.10.3 (2021-11-06)

#### Fixes

* the bot did not inform about the skip in case of the filter on mutual friends or on the link in bio
* false positive for link check in bio

Full set of changes: [`2.10.2...2.10.3`](https://github.com/GramAddict/bot/compare/2.10.2...2.10.3)

## 2.10.2 (2021-11-06)

#### Fixes

* link in bio object exists even if it's empty

Full set of changes: [`2.10.1...2.10.2`](https://github.com/GramAddict/bot/compare/2.10.1...2.10.2)

## 2.10.1 (2021-10-31)

#### Fixes

* someone in the world has a " ’ " as thousands separator instead of " , "

Full set of changes: [`2.10.0...2.10.1`](https://github.com/GramAddict/bot/compare/2.10.0...2.10.1)

## 2.10.0 (2021-10-27)

#### New Features

* you can control if comment carousels
* support for connect_adb_wifi uia2 method
* support for watching videos and check for already liked posts
#### Fixes

* trying to close the android pop-up if ig crashes
* looking for the like button on the following video instead of the one being played
* comment fails on some media types
* checking media_type could fail
* empty files in unfollow from list job
* unfollow from list loop
* removed unexpected keyword argument in getFollowinCount method
* method connect_adb_wifi contained some errors
* was being imported nan by numpy instead of the math module
* ig is not opened but the bot tries to do operations
#### Performance improvements

* video recording
* posts-from-file job improved and fixed
* little improvements to the module mode

Full set of changes: [`2.9.2...2.10.0`](https://github.com/GramAddict/bot/compare/2.9.2...2.10.0)

## 2.9.2 (2021-10-06)

Expand All @@ -13,9 +237,17 @@ Full set of changes: [`2.9.1...2.9.2`](https://github.com/GramAddict/bot/compare
#### New Features

* module version thanks to @patbengr
* if a username in *.txt file is not found, it will be appended to a *_not_found.txt
* from now, you can customize the session ending conditions
#### Fixes

* compatibility with IG: 208.0.0.32.135
* cannot check the language of Ig if not at the top of the account
* handle an exception in case you start the bot without specifying the config file
* it could happen that you are not at the top of your main profile in some circumstances
#### Performance improvements

* clean code for open and close ig

Full set of changes: [`2.9.0...2.9.1`](https://github.com/GramAddict/bot/compare/2.9.0...2.9.1)

Expand All @@ -38,7 +270,7 @@ Full set of changes: [`2.8.0...2.9.0`](https://github.com/GramAddict/bot/compare
#### New Features

* new filters: 'skip_if_link_in_bio: true/false' and 'mutual_friends: a_number' min count
* new feature added: pre and post script execution
* new feature added: pre- and post-script execution

Full set of changes: [`2.7.7...2.8.0`](https://github.com/GramAddict/bot/compare/2.7.7...2.8.0)

Expand Down Expand Up @@ -103,7 +335,7 @@ Full set of changes: [`2.7.2...2.7.3`](https://github.com/GramAddict/bot/compare
* bug in open post container when someone in your 'following list' has also liked the post
#### Performance improvements

* lowered a little bit the swipe up in sorting `Following accounts`
* lowered a little the swipe up in sorting `Following accounts`

Full set of changes: [`2.7.1...2.7.2`](https://github.com/GramAddict/bot/compare/2.7.1...2.7.2)

Expand All @@ -114,7 +346,7 @@ Full set of changes: [`2.7.1...2.7.2`](https://github.com/GramAddict/bot/compare
* you can dump your current screen with that command `gramaddict dump`
#### Performance improvements

* we don't need to click on a obj if we are already on it
* we don't need to click on an obj if we are already on it

Full set of changes: [`2.7.0...2.7.1`](https://github.com/GramAddict/bot/compare/2.7.0...2.7.1)

Expand Down Expand Up @@ -203,7 +435,7 @@ Full set of changes: [`2.6.0...2.6.1`](https://github.com/GramAddict/bot/compare
* browse the carousel could fail in some circumstances
#### Docs

* complitely rewrote the README.md
* completely rewrote the README.md
#### Others

* donation alert when bot stops by pressing CTRL+C
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to GramAddict and its assocated repos, which are hosted in the [GramAddict Organization](https://github.com/gramaddict) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to GramAddict and its associated repos, which are hosted in the [GramAddict Organization](https://github.com/gramaddict) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

#### Table Of Contents
- [I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
Expand Down
4 changes: 4 additions & 0 deletions GramAddict/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""Human-like Instagram bot powered by UIAutomator2"""
__version__ = "3.2.7"
__tested_ig_version__ = "226.1.0.16.117"

from GramAddict.core.bot_flow import start_bot


Expand Down
Loading

0 comments on commit 8af7319

Please sign in to comment.