article_account.py 697 B

123456789101112131415161718192021222324252627282930313233
  1. """
  2. @author: luojunhui
  3. """
  4. import requests
  5. class ArticleRank(object):
  6. """
  7. 账号排序
  8. """
  9. url = "http://192.168.100.31:8179/score_list"
  10. @classmethod
  11. def rank(cls, account_list, text_list):
  12. """
  13. Rank
  14. :param account_list:
  15. :param text_list:
  16. :return:
  17. """
  18. body = {
  19. "account_nickname_list": account_list,
  20. "text_list": text_list,
  21. "max_time": None,
  22. "min_time": None,
  23. "interest_type": "by_avg",
  24. "sim_type": "mean",
  25. "rate": 0.1
  26. }
  27. response = requests.post(url=cls.url, headers={}, json=body).json()
  28. return response