Util Features

When we don`t know where to place a feature, this is mamas house

app.util.formatNumber(number)

Receive an unformated number an return a formated number

app.util.get_account_id(username)

Return the related account id

Args:
username:username to be consulted
app.util.get_active_users(browser, username, posts, logger)

Returns a list with users who liked the latest posts

Args:
browser:web driver
username:our username
posts:amount of posts to be verified
logger:library to log actions
Returns:
Active Users based on filter above
app.util.is_account_active(browser, profile)

Check if it`s an active Instagram Account

Args:
browser:web driver
profile:profile name to be checked
Returns:
True for active profiles / False for invalid profiles
app.util.scroll_bottom(browser, element, range_int)

Instagram doesn`t load all content once, and we need to scroll the pages down to load more content

Args:
browser:web driver
element:web page element to be scrolled
rand_int:calculates the scrolling limit
Returns:
wtf?
app.util.update_activity(action=None)

Record every Instagram server call (page load, content load, likes, comments, follows, unfollow).

Note

we need to reorganize this idea

app.util.validate_username(browser, username, blacklist, like_by_followers_upper_limit, like_by_followers_lower_limit)

Check if we can interact with the user

Args:
browser:web driver
username:our username
blacklist:blacklist setup
like_by_followers_upper_limit:
 <-
like_by_followers_lower_limit:
 <-

Note

are we using it ?