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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare-proxy-patch
3
- Version: 0.1.4
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
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -28,3 +28,7 @@ akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
28
28
  # df = ak.stock_zh_a_spot_em()
29
29
  # 你的其他代码......
30
30
  ```
31
+
32
+ # 使用问题交流群
33
+
34
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -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 = ("push2.eastmoney.com" in url) or ("push2his.eastmoney.com" in url)
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
- print("请先登录 https://cheapproxy.net 联系客服获取授权码")
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare-proxy-patch
3
- Version: 0.1.4
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
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "akshare-proxy-patch" # 包名,需在 PyPI 唯一
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  authors = [
9
9
  { name="cheapproxy", email="emezxyj1@gmail.com" },
10
10
  ]
@@ -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.4", # 版本号
8
+ version="0.1.5", # 版本号
9
9
  author="cheapproxy.net",
10
10
  author_email="emezxyj1@gmail.com",
11
11
  description="AkShare 报错全局Hook",