lib/botinsta/modes.rb in botinsta-0.1.2 vs lib/botinsta/modes.rb in botinsta-0.1.3

- old
+ new

@@ -15,11 +15,11 @@ if is_first_page set_query_id(tag) get_first_page_data(tag) is_first_page = false break if @page.medias_empty? - elsif like_count == @page.media_count && @page.has_next_page? + elsif @page.next_page? get_next_page_data(tag) end @page.medias.each do |media| media.extend Hashie::Extensions::DeepFind @media = MediaData.new(media) @@ -43,10 +43,10 @@ print_error_message(action: :follow, data: @user.username) end end # Here is the code for unfollowing users - if !@table_follows.empty? && one_day_past?(@last_follow_time) && @total_unfollows != @unfollows_per_run + if !@table_follows.empty? && unfollow_threshold_past?(@last_follow_time) && @total_unfollows != @unfollows_per_run if unfollow_user(@first_db_entry[:user_id]) @total_unfollows += 1 print_success_message(action: :unfollow, number: @total_unfollows, data: @first_db_entry[:username]) delete_from_db(@first_db_entry[:user_id]) \ No newline at end of file