akshare-proxy-patch 0.1.4__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of akshare-proxy-patch might be problematic. Click here for more details.
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/PKG-INFO +5 -1
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/README.md +4 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch/__init__.py +10 -2
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/PKG-INFO +5 -1
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/pyproject.toml +1 -1
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/setup.py +1 -1
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/LICENSE +0 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/SOURCES.txt +0 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/dependency_links.txt +0 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/requires.txt +0 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/top_level.txt +0 -0
- {akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: akshare-proxy-patch
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
|
|
5
5
|
Home-page: https://github.com/helloyie/akshare-proxy-patch
|
|
6
6
|
Author: cheapproxy.net
|
|
@@ -49,3 +49,7 @@ akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
|
|
|
49
49
|
# df = ak.stock_zh_a_spot_em()
|
|
50
50
|
# 你的其他代码......
|
|
51
51
|
```
|
|
52
|
+
|
|
53
|
+
# 使用问题交流群
|
|
54
|
+
|
|
55
|
+

|
|
@@ -9,7 +9,11 @@ def install_patch(auth_ip, auth_token):
|
|
|
9
9
|
def patched_send(self, request, **kwargs):
|
|
10
10
|
auth_url = f"http://{auth_ip}:47001/api/akshare-auth"
|
|
11
11
|
url = request.url
|
|
12
|
-
is_hook = (
|
|
12
|
+
is_hook = (
|
|
13
|
+
("fund.eastmoney.com" in url)
|
|
14
|
+
or ("push2.eastmoney.com" in url)
|
|
15
|
+
or ("push2his.eastmoney.com" in url)
|
|
16
|
+
)
|
|
13
17
|
for i in range(60):
|
|
14
18
|
try:
|
|
15
19
|
if not is_hook:
|
|
@@ -20,7 +24,11 @@ def install_patch(auth_ip, auth_token):
|
|
|
20
24
|
auth_url, params={"token": auth_token}, timeout=5
|
|
21
25
|
).json()
|
|
22
26
|
if not auth_res["ua"]:
|
|
23
|
-
|
|
27
|
+
error_msg = (
|
|
28
|
+
auth_res.get("error_msg", "")
|
|
29
|
+
or "未知异常,请联系 cheapproxy.net 客服"
|
|
30
|
+
)
|
|
31
|
+
print(error_msg)
|
|
24
32
|
return None
|
|
25
33
|
|
|
26
34
|
HTTPAdapter.send = patched_send
|
{akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: akshare-proxy-patch
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
|
|
5
5
|
Home-page: https://github.com/helloyie/akshare-proxy-patch
|
|
6
6
|
Author: cheapproxy.net
|
|
@@ -49,3 +49,7 @@ akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
|
|
|
49
49
|
# df = ak.stock_zh_a_spot_em()
|
|
50
50
|
# 你的其他代码......
|
|
51
51
|
```
|
|
52
|
+
|
|
53
|
+
# 使用问题交流群
|
|
54
|
+
|
|
55
|
+

|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="akshare-proxy-patch", # 包名,用户 pip install 时的名称
|
|
8
|
-
version="0.1.
|
|
8
|
+
version="0.1.5", # 版本号
|
|
9
9
|
author="cheapproxy.net",
|
|
10
10
|
author_email="emezxyj1@gmail.com",
|
|
11
11
|
description="AkShare 报错全局Hook",
|
|
File without changes
|
{akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/requires.txt
RENAMED
|
File without changes
|
{akshare_proxy_patch-0.1.4 → akshare_proxy_patch-0.1.5}/akshare_proxy_patch.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|