字典形式返回所有代理, 使用changeTable指定hash name :return:
(self, https)
| 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 | """ |