instabot 0.1.81 → 0.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/instabot.rb +11 -11
- data/lib/instabot/actions.rb +56 -56
- data/lib/instabot/banner.rb +16 -16
- data/lib/instabot/config.rb +51 -51
- data/lib/instabot/core.rb +113 -108
- data/lib/instabot/create_protocol.rb +51 -51
- data/lib/instabot/grabber.rb +114 -112
- data/lib/instabot/logger.rb +61 -61
- data/lib/instabot/login.rb +62 -62
- data/lib/instabot/modes.rb +228 -239
- data/lib/instabot/tor_protocol.rb +81 -81
- data/lib/instabot/version.rb +5 -5
- metadata +3 -3
data/lib/instabot/login.rb
CHANGED
@@ -1,62 +1,62 @@
|
|
1
|
-
module Login
|
2
|
-
def login(username = '', password = '')
|
3
|
-
if @login_mode == :manual
|
4
|
-
username = username.to_s
|
5
|
-
password = password.to_s
|
6
|
-
else
|
7
|
-
username = options[:username]
|
8
|
-
password = options[:password]
|
9
|
-
end
|
10
|
-
|
11
|
-
log('trying to login', 'LOGIN')
|
12
|
-
puts '[+] '.cyan + "Trying to login
|
13
|
-
login_page = @agent.get('https://www.instagram.com/accounts/login/?force_classic_login')
|
14
|
-
page_form = login_page.forms.last
|
15
|
-
page_form.username = username
|
16
|
-
page_form.password = password
|
17
|
-
page = page_form.submit
|
18
|
-
|
19
|
-
if page.code == '200' && page.uri.to_s != 'https://www.instagram.com/accounts/login/?force_classic_login' && !page.uri.to_s.include?('challenge')
|
20
|
-
@login_status = true
|
21
|
-
log('successfully logged in', 'LOGIN')
|
22
|
-
puts '[+] '.cyan + 'Successfully logged in'.green.bold
|
23
|
-
else
|
24
|
-
@login_status = false
|
25
|
-
if page.uri.to_s.include?('challenge')
|
26
|
-
puts '[-] '.cyan + 'Your account needs veryfication or it has been banned from instagram'.red.bold
|
27
|
-
else
|
28
|
-
puts '[-] '.cyan + 'Invalid username or password'.red.bold
|
29
|
-
end
|
30
|
-
check_login_status
|
31
|
-
end
|
32
|
-
|
33
|
-
rescue Exception => e
|
34
|
-
log("an error detected: #{e.class} #{e} #{e.backtrace}", 'LOGIN')
|
35
|
-
@login_status = false
|
36
|
-
puts '[-] '.cyan + "#{e.class} #{e.message}\n check out the log file for full trace ".red
|
37
|
-
exit
|
38
|
-
end
|
39
|
-
|
40
|
-
def logout
|
41
|
-
log('trying to logout', 'LOGIN')
|
42
|
-
puts '[+] '.cyan + 'Trying to logging out'
|
43
|
-
set_mechanic_data
|
44
|
-
@agent.get('https://www.instagram.com/accounts/logout/')
|
45
|
-
@logout_status = true
|
46
|
-
log('successfully logged out', 'LOGIN')
|
47
|
-
puts '[+] '.cyan + 'Successfully logged out'
|
48
|
-
end
|
49
|
-
|
50
|
-
def check_login_status(_mode = :default)
|
51
|
-
puts '[+] '.cyan + 'Checking login status' if @login_mode != :manual
|
52
|
-
log('checking loging status', 'LOGIN')
|
53
|
-
if @login_status
|
54
|
-
return true
|
55
|
-
else
|
56
|
-
puts "[-] [##{@login_counter}] ".cyan + "You're not logged in (or it is an error with the request)\t[TRYING AGAIN]".red.bold
|
57
|
-
exit! if @login_counter == 3
|
58
|
-
@login_counter += 1
|
59
|
-
login
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
1
|
+
module Login
|
2
|
+
def login(username = '', password = '')
|
3
|
+
if @login_mode == :manual
|
4
|
+
username = username.to_s
|
5
|
+
password = password.to_s
|
6
|
+
else
|
7
|
+
username = options[:username]
|
8
|
+
password = options[:password]
|
9
|
+
end
|
10
|
+
|
11
|
+
log('trying to login', 'LOGIN')
|
12
|
+
puts '[+] '.cyan + "Trying to login as [#{username}]"
|
13
|
+
login_page = @agent.get('https://www.instagram.com/accounts/login/?force_classic_login')
|
14
|
+
page_form = login_page.forms.last
|
15
|
+
page_form.username = username
|
16
|
+
page_form.password = password
|
17
|
+
page = page_form.submit
|
18
|
+
|
19
|
+
if page.code == '200' && page.uri.to_s != 'https://www.instagram.com/accounts/login/?force_classic_login' && !page.uri.to_s.include?('challenge')
|
20
|
+
@login_status = true
|
21
|
+
log('successfully logged in', 'LOGIN')
|
22
|
+
puts '[+] '.cyan + 'Successfully logged in'.green.bold
|
23
|
+
else
|
24
|
+
@login_status = false
|
25
|
+
if page.uri.to_s.include?('challenge')
|
26
|
+
puts '[-] '.cyan + 'Your account needs veryfication or it has been banned from instagram'.red.bold
|
27
|
+
else
|
28
|
+
puts '[-] '.cyan + 'Invalid username or password'.red.bold
|
29
|
+
end
|
30
|
+
check_login_status
|
31
|
+
end
|
32
|
+
|
33
|
+
rescue Exception => e
|
34
|
+
log("an error detected: #{e.class} #{e} #{e.backtrace}", 'LOGIN')
|
35
|
+
@login_status = false
|
36
|
+
puts '[-] '.cyan + "#{e.class} #{e.message}\n check out the log file for full trace ".red
|
37
|
+
exit
|
38
|
+
end
|
39
|
+
|
40
|
+
def logout
|
41
|
+
log('trying to logout', 'LOGIN')
|
42
|
+
puts '[+] '.cyan + 'Trying to logging out'
|
43
|
+
set_mechanic_data
|
44
|
+
@agent.get('https://www.instagram.com/accounts/logout/')
|
45
|
+
@logout_status = true
|
46
|
+
log('successfully logged out', 'LOGIN')
|
47
|
+
puts '[+] '.cyan + 'Successfully logged out'
|
48
|
+
end
|
49
|
+
|
50
|
+
def check_login_status(_mode = :default)
|
51
|
+
puts '[+] '.cyan + 'Checking login status' if @login_mode != :manual
|
52
|
+
log('checking loging status', 'LOGIN')
|
53
|
+
if @login_status
|
54
|
+
return true
|
55
|
+
else
|
56
|
+
puts "[-] [##{@login_counter}] ".cyan + "You're not logged in (or it is an error with the request)\t[TRYING AGAIN]".red.bold
|
57
|
+
exit! if @login_counter == 3
|
58
|
+
@login_counter += 1
|
59
|
+
login
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/lib/instabot/modes.rb
CHANGED
@@ -1,239 +1,228 @@
|
|
1
|
-
# modes module and helpers
|
2
|
-
module Modes
|
3
|
-
# main def and mode selector
|
4
|
-
def mode(mode = :default)
|
5
|
-
case mode
|
6
|
-
when :infinite
|
7
|
-
puts '[+] '.cyan + '[Auto] mode is turned on'.yellow
|
8
|
-
log('[Auto] mode is turned on', 'MODES')
|
9
|
-
search(options[:tags])
|
10
|
-
@tomorrow = Time.new + 1.days
|
11
|
-
actions = %w[follow unfollow like comment]
|
12
|
-
loop do
|
13
|
-
if !maximums_are_full?
|
14
|
-
action = actions.sample
|
15
|
-
case action
|
16
|
-
when 'follow'
|
17
|
-
if !follows_in_day_are_full?
|
18
|
-
auto_follow
|
19
|
-
end
|
20
|
-
when 'unfollow'
|
21
|
-
if !unfollows_in_day_are_full?
|
22
|
-
auto_unfollow
|
23
|
-
end
|
24
|
-
when 'like'
|
25
|
-
if !likes_in_day_are_full?
|
26
|
-
auto_like
|
27
|
-
end
|
28
|
-
when 'comment'
|
29
|
-
if !comments_in_day_are_full?
|
30
|
-
auto_comment
|
31
|
-
end
|
32
|
-
end
|
33
|
-
else
|
34
|
-
check_date
|
35
|
-
sleep 1
|
36
|
-
end
|
37
|
-
end
|
38
|
-
when :clean_up
|
39
|
-
puts '[+] '.cyan + '[Clean up] mode is turned on'.upcase.yellow
|
40
|
-
log('[Clean up] mode is turned on', 'MODES')
|
41
|
-
@local_stroage[:followed_users].each do |user|
|
42
|
-
unfollow(user)
|
43
|
-
fall_in_asleep
|
44
|
-
end
|
45
|
-
when :default
|
46
|
-
puts '[-] '.cyan + 'Please choose a mode'.upcase.red
|
47
|
-
else
|
48
|
-
puts '[-] '.cyan + 'Please choose a mode'.upcase.red
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def auto_follow
|
53
|
-
all_users = @users
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
follow
|
63
|
-
@
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
@
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
@
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
end
|
230
|
-
|
231
|
-
def comments_in_day_are_full?
|
232
|
-
@maximums[:comments_in_day] == @maximums[:max_comments_per_day]
|
233
|
-
end
|
234
|
-
|
235
|
-
def maximums_are_full?
|
236
|
-
likes_in_day_are_full? && follows_in_day_are_full? &&
|
237
|
-
unfollows_in_day_are_full? && comments_in_day_are_full?
|
238
|
-
end
|
239
|
-
end
|
1
|
+
# modes module and helpers
|
2
|
+
module Modes
|
3
|
+
# main def and mode selector
|
4
|
+
def mode(mode = :default)
|
5
|
+
case mode
|
6
|
+
when :infinite
|
7
|
+
puts '[+] '.cyan + '[Auto] mode is turned on'.yellow
|
8
|
+
log('[Auto] mode is turned on', 'MODES')
|
9
|
+
search(options[:tags])
|
10
|
+
@tomorrow = Time.new + 1.days
|
11
|
+
actions = %w[follow unfollow like comment]
|
12
|
+
loop do
|
13
|
+
if !maximums_are_full?
|
14
|
+
action = actions.sample
|
15
|
+
case action
|
16
|
+
when 'follow'
|
17
|
+
if !follows_in_day_are_full?
|
18
|
+
auto_follow
|
19
|
+
end
|
20
|
+
when 'unfollow'
|
21
|
+
if !unfollows_in_day_are_full?
|
22
|
+
auto_unfollow
|
23
|
+
end
|
24
|
+
when 'like'
|
25
|
+
if !likes_in_day_are_full?
|
26
|
+
auto_like
|
27
|
+
end
|
28
|
+
when 'comment'
|
29
|
+
if !comments_in_day_are_full?
|
30
|
+
auto_comment
|
31
|
+
end
|
32
|
+
end
|
33
|
+
else
|
34
|
+
check_date
|
35
|
+
sleep 1
|
36
|
+
end
|
37
|
+
end
|
38
|
+
when :clean_up
|
39
|
+
puts '[+] '.cyan + '[Clean up] mode is turned on'.upcase.yellow
|
40
|
+
log('[Clean up] mode is turned on', 'MODES')
|
41
|
+
@local_stroage[:followed_users].each do |user|
|
42
|
+
unfollow(user)
|
43
|
+
fall_in_asleep
|
44
|
+
end
|
45
|
+
when :default
|
46
|
+
puts '[-] '.cyan + 'Please choose a mode'.upcase.red
|
47
|
+
else
|
48
|
+
puts '[-] '.cyan + 'Please choose a mode'.upcase.red
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def auto_follow
|
53
|
+
all_users = @users
|
54
|
+
search(options[:tags]) if all_users == [] || all_users.nil?
|
55
|
+
@follows_auto_increment = 0
|
56
|
+
puts '[+] '.cyan + "[follow] ".upcase.yellow.bold + "#{all_users.size} user is ready".upcase
|
57
|
+
while @maximums[:follows_in_day] < @maximums[:max_follows_per_day]
|
58
|
+
begin
|
59
|
+
@users -= all_users[@follows_auto_increment] if all_users[@follows_auto_increment].nil? || all_users[@follows_auto_increment] == []
|
60
|
+
handle_user_information_data_by_user_id(all_users[@follows_auto_increment])
|
61
|
+
if !is_user_valid?(@user_information[:full_name])
|
62
|
+
puts '[+] '.cyan + "Trying to follow user [#{all_users[@follows_auto_increment]}]"
|
63
|
+
follow(@user_information[:id])
|
64
|
+
@users -= [all_users[@follows_auto_increment]]
|
65
|
+
puts '[+] '.cyan + 'User followed'.upcase.green.bold
|
66
|
+
@maximums[:follows_in_day] += 1
|
67
|
+
@follows_auto_increment += 1
|
68
|
+
fall_in_asleep
|
69
|
+
else
|
70
|
+
puts "unwanted user(#{@user_information[:full_name]}) [ignored]".yellow
|
71
|
+
@follows_auto_increment += 1
|
72
|
+
end
|
73
|
+
break
|
74
|
+
rescue Exception => e
|
75
|
+
puts "An error occured ... #{e.class} #{e.message}\n#{e.backtrace.inspect}\n[ignored]"
|
76
|
+
@follows_auto_increment += 1
|
77
|
+
break
|
78
|
+
retry
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def auto_unfollow
|
84
|
+
followed_users = @local_stroage[:followed_users]
|
85
|
+
puts '[+] '.cyan + "[unfollow] ".upcase.yellow.bold + "#{followed_users.size} user is ready".upcase
|
86
|
+
@unfollows_auto_increment = 0
|
87
|
+
while @maximums[:unfollows_in_day] < @maximums[:max_unfollows_per_day]
|
88
|
+
if @local_stroage[:followed_users].size < @maximums[:max_unfollows_per_day]
|
89
|
+
if !followed_users.empty?
|
90
|
+
begin
|
91
|
+
puts '[+] '.cyan + "Trying to unfollow user [#{followed_users[@unfollows_auto_increment]}]"
|
92
|
+
unfollow(followed_users[@unfollows_auto_increment])
|
93
|
+
@local_stroage[:followed_users] -= [followed_users[@unfollows_auto_increment]]
|
94
|
+
puts '[+] '.cyan + 'User unfollowed'.upcase.bold.green
|
95
|
+
@maximums[:unfollows_in_day] += 1
|
96
|
+
@unfollows_auto_increment += 1
|
97
|
+
fall_in_asleep
|
98
|
+
break
|
99
|
+
rescue Exception => e
|
100
|
+
puts "An error occured ... #{e.class} #{e.message}\n#{e.backtrace.inspect}\n[ignored]"
|
101
|
+
@unfollows_auto_increment += 1
|
102
|
+
break
|
103
|
+
end
|
104
|
+
else
|
105
|
+
break
|
106
|
+
end
|
107
|
+
else
|
108
|
+
puts '[-] '.red + '[unfollow per day] is much bigger than [follow per day]'.upcase.red.bold
|
109
|
+
exit!
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def auto_like
|
115
|
+
all_medias = @medias
|
116
|
+
search(options[:tags]) if all_medias == [] || all_medias.nil?
|
117
|
+
puts '[+] '.cyan + "[like] ".upcase.yellow.bold + "#{all_medias.size} Media is ready".upcase
|
118
|
+
while @maximums[:likes_in_day] < @maximums[:max_likes_per_day]
|
119
|
+
begin
|
120
|
+
@medias -= [all_medias[@likes_auto_increment]] if all_medias[@likes_auto_increment].nil? || all_medias[@likes_auto_increment] == []
|
121
|
+
handle_media_information_data(all_medias[@likes_auto_increment])
|
122
|
+
puts '[+] '.cyan + "Trying to like media [#{all_medias[@likes_auto_increment]}]"
|
123
|
+
like(@media_information[:id])
|
124
|
+
@medias -= [all_medias[@likes_auto_increment]]
|
125
|
+
puts '[+] '.cyan + 'Media liked'.upcase.green.bold
|
126
|
+
@maximums[:likes_in_day] += 1
|
127
|
+
fall_in_asleep
|
128
|
+
break
|
129
|
+
rescue Exception => e
|
130
|
+
puts "An error occured ... #{e.class} #{e.message}\n#{e.backtrace.inspect}\n[ignored]"
|
131
|
+
@medias -= [all_medias[@likes_auto_increment]]
|
132
|
+
break
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def auto_comment
|
138
|
+
all_medias = @medias
|
139
|
+
search(options[:tags]) if all_medias == [] || all_medias.nil?
|
140
|
+
puts '[+] '.cyan + "[comment] ".upcase.yellow.bold + "#{all_medias.size} Media is ready".upcase
|
141
|
+
@comments_auto_increment = 0
|
142
|
+
while @maximums[:comments_in_day] < @maximums[:max_comments_per_day]
|
143
|
+
begin
|
144
|
+
@medias -= [all_medias[@comments_auto_increment]] if all_medias[@comments_auto_increment].nil? || all_medias[@comments_auto_increment] == []
|
145
|
+
handle_media_information_data(all_medias[@comments_auto_increment])
|
146
|
+
if @media_information[:comments_disabled]
|
147
|
+
puts '[-]'.cyan + 'comments are disable' + "\t[ignored]".yellow
|
148
|
+
@comments_auto_increment += 1
|
149
|
+
end
|
150
|
+
generated_comment = generate_a_comment
|
151
|
+
puts '[+] '.cyan + "Trying to send a comment[#{generated_comment}] to media[#{all_medias[@comments_auto_increment]}]"
|
152
|
+
comment(@media_information[:id], generated_comment)
|
153
|
+
@medias -= [all_medias[@comments_auto_increment]]
|
154
|
+
puts '[+] '.cyan + 'comment has been sent'.upcase.green.bold
|
155
|
+
@maximums[:comments_in_day] += 1
|
156
|
+
fall_in_asleep
|
157
|
+
break
|
158
|
+
rescue Exception => e
|
159
|
+
puts "An error occured ... #{e.class} #{e.message}\n#{e.backtrace.inspect}\n[ignored]"
|
160
|
+
@comments_auto_increment += 1
|
161
|
+
break
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# genrating random comment
|
167
|
+
def generate_a_comment
|
168
|
+
comment = ""
|
169
|
+
options[:comments].each { |c| comment << " #{c.sample}" }
|
170
|
+
comment
|
171
|
+
end
|
172
|
+
|
173
|
+
def is_user_valid?(user)
|
174
|
+
if options[:white_list_users].include?(user)
|
175
|
+
options[:unwanted_list].find { |unwanted| unwanted =~ /#{user}/ } != nil
|
176
|
+
else
|
177
|
+
return false
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
def check_date
|
183
|
+
time = (@tomorrow - Time.new).to_i # => remained time ...
|
184
|
+
if time.zero?
|
185
|
+
puts '[+] '.cyan + "[new day]".upcase
|
186
|
+
@local_stroage[:followed_users] = []
|
187
|
+
@local_stroage[:unfollowed_users] = []
|
188
|
+
@local_stroage[:liked_medias] = []
|
189
|
+
@local_stroage[:commented_medias] = []
|
190
|
+
@maximums[:follows_in_day] = 0
|
191
|
+
@maximums[:unfollows_in_day] = 0
|
192
|
+
@maximums[:likes_in_day] = 0
|
193
|
+
@maximums[:comments_in_day] = 0
|
194
|
+
@tomorrow = Time.new + 1.days
|
195
|
+
search(options[:tags]) unless @infinite_tags == true
|
196
|
+
else
|
197
|
+
time = Time.at(time).utc.strftime("%H:%M:%S")
|
198
|
+
print "\r[+] ".cyan + "#{time} remained".upcase + ' '*10 # the empty space
|
199
|
+
$stdout.flush
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
def fall_in_asleep(time=options[:wait_per_action])
|
204
|
+
puts '[+] '.cyan + "Waiting for #{time} seconds".upcase
|
205
|
+
sleep time
|
206
|
+
end
|
207
|
+
|
208
|
+
def likes_in_day_are_full?
|
209
|
+
@maximums[:likes_in_day] == @maximums[:max_likes_per_day]
|
210
|
+
end
|
211
|
+
|
212
|
+
def follows_in_day_are_full?
|
213
|
+
@maximums[:follows_in_day] == @maximums[:max_follows_per_day]
|
214
|
+
end
|
215
|
+
|
216
|
+
def unfollows_in_day_are_full?
|
217
|
+
@maximums[:unfollows_in_day] == @maximums[:max_unfollows_per_day]
|
218
|
+
end
|
219
|
+
|
220
|
+
def comments_in_day_are_full?
|
221
|
+
@maximums[:comments_in_day] == @maximums[:max_comments_per_day]
|
222
|
+
end
|
223
|
+
|
224
|
+
def maximums_are_full?
|
225
|
+
likes_in_day_are_full? && follows_in_day_are_full? &&
|
226
|
+
unfollows_in_day_are_full? && comments_in_day_are_full?
|
227
|
+
end
|
228
|
+
end
|