article_account.py 708 B

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