示例#1
0
 def job():
     self.action_status.set(ActionState.RUNNING)
     navigate(device_wrapper.get(), TabBarTabs.PROFILE)
     if source[0] == '@':
         source_name, instructions = extract_blogger_instructions(source)
         handle_blogger(device_wrapper.get(),
                        source_name[1:],  # drop "@"
                        instructions,
                        session_state,
                        self.likes_count,
                        self.stories_count,
                        self.follow_percentage,
                        self.like_percentage,
                        self.comment_percentage,
                        self.comments_list,
                        storage,
                        on_action,
                        is_limit_reached,
                        is_passed_filters,
                        self.action_status)
     elif source[0] == '#':
         source_name, instructions = extract_hashtag_instructions(source)
         handle_hashtag(device_wrapper.get(),
                        source_name[1:],  # drop "#"
                        instructions,
                        session_state,
                        self.likes_count,
                        self.stories_count,
                        self.follow_percentage,
                        self.like_percentage,
                        self.comment_percentage,
                        self.comments_list,
                        storage,
                        on_action,
                        is_limit_reached,
                        is_passed_filters,
                        self.action_status)
     elif source.startswith("P-"):
         source_name, instructions = extract_place_instructions(source[2:])
         handle_place(device_wrapper.get(),
                      source_name,
                      instructions,
                      session_state,
                      self.likes_count,
                      self.stories_count,
                      self.follow_percentage,
                      self.like_percentage,
                      self.comment_percentage,
                      self.comments_list,
                      storage,
                      on_action,
                      is_limit_reached,
                      is_passed_filters,
                      self.action_status)
     self.action_status.set(ActionState.DONE)
示例#2
0
            def job():
                self.action_status.set(ActionState.RUNNING)
                if source[0] == '@':
                    source_name, instructions = extract_blogger_instructions(
                        source)
                    handle_blogger(
                        device_wrapper.get(),
                        source_name[1:],  # drop "@"
                        instructions,
                        session_state,
                        self.likes_count,
                        self.stories_count,
                        self.follow_percentage,
                        self.like_percentage,
                        storage,
                        on_action,
                        is_limit_reached,
                        is_passed_filters,
                        self.action_status)
                elif source[0] == '#':
                    source_name, instructions = extract_hashtag_instructions(
                        source)
                    handle_hashtag(
                        device_wrapper.get(),
                        source_name[1:],  # drop "#"
                        instructions,
                        session_state,
                        self.likes_count,
                        self.stories_count,
                        self.follow_percentage,
                        self.like_percentage,
                        storage,
                        on_action,
                        is_limit_reached,
                        is_passed_filters,
                        self.action_status)

                self.action_status.set(ActionState.DONE)