MCPcopy
hub / github.com/InstaPy/InstaPy / follow_through_dialog

Function follow_through_dialog

instapy/unfollow_util.py:864–933  ·  view source on GitHub ↗

Will follow username directly inside a dialog box

(
    browser,
    login,
    person_list,
    buttons,
    amount,
    dont_include,
    blacklist,
    follow_times,
    jumps,
    logger,
    logfolder,
)

Source from the content-addressed store, hash-verified

862
863
864def follow_through_dialog(
865 browser,
866 login,
867 person_list,
868 buttons,
869 amount,
870 dont_include,
871 blacklist,
872 follow_times,
873 jumps,
874 logger,
875 logfolder,
876):
877 """Will follow username directly inside a dialog box"""
878 if not isinstance(person_list, list):
879 person_list = [person_list]
880
881 if not isinstance(buttons, list):
882 buttons = [buttons]
883
884 person_followed = []
885 followNum = 0
886
887 try:
888 for person, button in zip(person_list, buttons):
889 if followNum >= amount:
890 logger.info("--> Total follow number reached: {}".format(followNum))
891 break
892
893 elif jumps["consequent"]["follows"] >= jumps["limit"]["follows"]:
894 logger.warning(
895 "--> Follow quotient reached its peak!\t~leaving "
896 "Follow-Through-Dialog activity\n"
897 )
898 break
899
900 if person not in dont_include and not follow_restriction(
901 "read", person, follow_times, logger
902 ):
903 follow_state, msg = follow_user(
904 browser,
905 "dialog",
906 login,
907 person,
908 button,
909 blacklist,
910 logger,
911 logfolder,
912 )
913 if follow_state is True:
914 # register this session's followed user for further
915 # interaction
916 person_followed.append(person)
917 followNum += 1
918 # reset jump counter after a successful follow
919 jumps["consequent"]["follows"] = 0
920
921 elif msg == "jumped":

Callers

nothing calls this directly

Calls 2

follow_restrictionFunction · 0.85
follow_userFunction · 0.85

Tested by

no test coverage detected