MCPcopy Index your code
hub / github.com/jhao104/proxy_pool / getAll

Method getAll

db/ssdbClient.py:107–116  ·  view source on GitHub ↗

字典形式返回所有代理, 使用changeTable指定hash name :return:

(self, https)

Source from the content-addressed store, hash-verified

105 self.__conn.hset(self.name, proxy_obj.proxy, proxy_obj.to_json)
106
107 def getAll(self, https):
108 """
109 字典形式返回所有代理, 使用changeTable指定hash name
110 :return:
111 """
112 item_dict = self.__conn.hgetall(self.name)
113 if https:
114 return list(filter(lambda x: json.loads(x).get("https"), item_dict.values()))
115 else:
116 return item_dict.values()
117
118 def clear(self):
119 """

Callers 1

getCountMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected