Agents with limited capacities need to cooperate with others to fulfil complex tasks in a multi-agent system. To find a reliable partner, agents with insufficient experience have to seek advice from advisors. Currently, most models are rating-based, aggregating advisors’ information on partners and calculating averaged results. These models have some drawbacks, like being vulnerable to unfair ratings under a high ratio of dishonest advisors or dynamic attacks and locally convergent. Therefore, this paper proposes a Ranking-based Partner Selection (RPS) model, which clusters honest and dishonest advisors into different groups based on their different rankings of trustees. Besides, RPS uses a sliding-window-based method to find dishonest advisors with dynamic attack behaviours. Furthermore, RPS utilizes an online-learning method to update model parameters based on real-time interaction results. According to experiment results, RPS outperforms ITEA under different kinds of unfair rating