feat: cache impl done

This commit is contained in:
Relakkes
2024-06-02 19:57:13 +08:00
parent 6c4116f240
commit 4bba1447f8
16 changed files with 180 additions and 43 deletions

View File

@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
# @Author : relakkes@gmail.com
# @Time : 2024/4/5 09:32
# @Desc : 极速HTTP代理提供类实现,官网地址https://www.jisuhttp.com?pl=zG3Jna
# @Desc : 已废弃!!!!!倒闭了!!!极速HTTP 代理IP实现
import os
from typing import Dict, List
from urllib.parse import urlencode
import httpx
from proxy import IpGetError, ProxyProvider, RedisDbIpCache
from proxy import IpCache, IpGetError, ProxyProvider
from proxy.types import IpInfoModel
from tools import utils
@@ -31,7 +31,7 @@ class JiSuHttpProxy(ProxyProvider):
"pw": "1", # 是否使用账密验证, 10否表示白名单验证默认为0
"se": "1", # 返回JSON格式时是否显示IP过期时间 1显示0不显示默认为0
}
self.ip_cache = RedisDbIpCache()
self.ip_cache = IpCache()
async def get_proxies(self, num: int) -> List[IpInfoModel]:
"""