InstaPy / InstaPy

📷 Instagram Bot - Tool for automated Instagram interactions
GNU General Public License v3.0
16.73k stars 3.77k forks source link

Documentation / Explanation of the Log Files #3689

Closed nickian closed 5 years ago

nickian commented 5 years ago

I didn't see any documentation of how the logs work for InstaPy. I'm trying to write a script to parse the logs and create a dashboard with stats.

I see the following logs in /InstaPy/logs/username/, but have questions about what they are exactly:

username_cookie.pkl

Not sure what this is for.

username_followedPool.csv

Is this just a list of who InstaPy has followed?

2019-01-03 21:02 ~ username1 ~ unknown,
2019-01-03 21:04 ~ username2 ~ 0000000000,

What is the number at the end? A user ID? What does "unknown" mean?

username_record_all_fllowed.csv

What is the difference between this and the above "followedPool"?

username_record_all_unfollowed.csv

This just lists usernames and appears to include many duplicates. Are these just attempts to unfollow? Why is there no date?

username_uncertain_unfollowedPool.csv

What's the difference between this and the above?

2019-01-05 09:49 ~ username ~ None,

What does "None" mean?

followed.txt

Is this just a textfile displaying the total people the app has followed so far?

followerNum.txt

This is pretty straightforward. Appears to just be pulling my follower account every time the app runs. It is displaying accurately.

followingNum.txt

Also straightforward. Appears to log how many I'm following each time InstaPy runs.

followingRestriction.json

What is this? I parsed the JSON file into a PHP array. Looks like this, but I have no clue what it means:

Array
(
    [my_username] => Array
        (
            [username1] => 1
            [username2] => 1
            [username3] => 1

Are these users that InstaPy will avoid in future attempts? Perhaps because it initially found that they didn't have the correct relationship ratio?

general.log

Looks like it's just the direct command line output saved to a log file.

recordActivity

What is this exactly? What do the key values represent? (e.g., on the the first 2019-01-03 array, what do the 16, 17, 21 numbers). Are those hours in 24 hour format? Or something else?

Parsed into a PHP array, it looks like:

Array
(
    [2019-01-03] => Array
        (
            [16] => Array
                (
                    [follows] => 0
                    [server_calls] => 191
                    [unfollows] => 0
                    [likes] => 23
                    [comments] => 0
                )

            [17] => Array
                (
                    [follows] => 0
                    [server_calls] => 14
                    [unfollows] => 0
                    [likes] => 1
                    [comments] => 0
                )

            [21] => Array
                (
                    [follows] => 46
                    [server_calls] => 379
                    [unfollows] => 9
                    [likes] => 0
                    [comments] => 0
                )

        )
)

Also, what is the /InstaPy/db/instapy.db file? Is there useful data here that I might be able to extract?

Thanks!

octavius-1 commented 5 years ago

followedPool states the users that are being followed in your account and they haven't been unfollowed yet, as long as they're unfollowed (while using the tool) they disappear from here. all_followed states all the users that the tool has followed. ever. This works for checking the maximum allowed times a user can be followed.

w4ngel commented 5 years ago

I could be wrong but I believe this is correct;

username_cookie.pkl

Cookie to login.

username_followedPool.csv

The followed pool is a list of names of people followed and currently following, along with their ID, if their ID is not known it's unknown. I believe.

username_record_all_fllowed.csv

A list of every name followed. This does not change compared to the other which can be changed. This is just added to.

username_record_all_unfollowed.csv

This is every name unfollowed.

username_uncertain_unfollowedPool.csv

Names that couldn't be unfollowed for whatever reason, so it just adds to it, None is the equivalent to unknown.

followed.txt

Every name followed.

followerNum.txt

The amount of followers an account has. Updated everytime it runs at the end of a session.

followingNum.txt

The amount of following an account has. Updated everytime it runs at the end of a session.

followingRestriction.json

I believe this is any account that it doesn't follow/unfollow for whatever reason.

general.log

Log of most actions if not everything.

recordActivity

This records the activity taken in a session so if you run multiple times in day you make sure you don't hit limits etc.

Some of these could be wrong, I don't work with many of the log parsing features.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue