Closed balakedev closed 7 years ago
Also, i highly recommend the Followers+ application on IOS. I used it to unfollow accounts that are not following me back after a week. :)
It would be great to have the number of Likes, Comments, Followers per Tag. So if you run the bot using multiple tags you will know how many posts for each was Liked, Commented, Followed.
The FollowerNum.txt log writes out the number of followers at the start of each session, so you can get some of the data you are looking for, Follower Count Start, Follower Count End, Follower Change. I wrote a simple python script to graph some of the data. But not down to the session, only for the day. You can easily modify the below to work for some of what you want. I have run the bot on different computers, therefore, multiple log files.
import csv
import pandas as pd
from ggplot import *
#list of log files (local to Macbook, RPI3)
filenames = ['followerNum.txt','../followerNum.txt']
#open csv file to and loop through files to create single file
with open('followerGrowth.csv', 'w') as fout:
o=csv.writer(fout)
for fname in filenames:
with open(fname) as fin:
next(csv.reader(fin), None)
for line in fin:
o.writerow(line.split())
#read csv into dataframe
df = pd.read_csv('followerGrowth.csv',
names = ['DATE','TIME','COUNT'])
#create dataframe for follower account at start of day
df2 = df.groupby(['DATE'], as_index=False, sort=False)['COUNT'].min()
#add column for added followers for each date
df2['ADDS'] = pd.rolling_apply(df2['COUNT'], 2, lambda x: x[1] - x[0])
df2['DATE'] = df2['DATE'].apply(pd.to_datetime)
gg2 = ggplot(df2, aes('DATE', 'ADDS')) +\
geom_line(color='blue')
gg = ggplot(df2, aes('DATE', 'COUNT')) +\
geom_line(color='blue')
#print plots
print(gg2)
print(gg)
@timgrossmann also, slightly separate discussion. In the like_util. "sleep" is used to help spread out the tasks on each post which has proven to be very useful in regards to keeping safe. However, do you think to even further develop this delay to an even more intricate level, you could implement some sort of variable that selects a random number between 1 and 5? That way it varies between posts making it even more detailed and harder to track by Instagram?
Let me know your thoughts
@blakemmw
Sleep is already incorporating randomness. Check out the time_util module to see how sleep is calculated.
The feature is on the way, #839.
Not sure if someone has already done it but i've been manually recording the sessions data like this:
Follower Count at start of session (ex: 2700) Follower count at end of session (ex: 2722) overall follower change ( ex: 22 || x%) tag amount x amount to interact ( ex: 16x32) time ran (ex:17:00) fileName ran: ( if you have multiple scripts that you run ( i have 5 different versions of the same script ))
liked already liked N/A commented followed
and then I record the follower change in between sessions
This information is really good to be able to plot data on a graph so you can see the trends. It also helps identify the best times to run the bot for the individual account.
I just started learning Python at university so i can't make this export to excel YET, but if you can im sure everyone would benefit from it!!!
Cheers