akshare-proxy-patch 0.2.3__tar.gz → 0.2.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.

@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.4
2
+ Name: akshare-proxy-patch
3
+ Version: 0.2.5
4
+ Summary: 针对 AkShare 和 efinance 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
5
+ Home-page: https://github.com/helloyie/akshare-proxy-patch
6
+ Author: cheapproxy.net
7
+ Author-email: cheapproxy <emezxyj1@gmail.com>
8
+ Project-URL: Homepage, https://github.com/cheapproxy/akshare-proxy-patch
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: requests
16
+ Dynamic: author
17
+ Dynamic: home-page
18
+ Dynamic: license-file
19
+ Dynamic: requires-python
20
+
21
+ # AkShare Proxy Patch
22
+ 针对 AkShare 和 efinance 的底层补丁,自动为东财接口注入代理认证头,从而避免AKShare: `stock_zh_a_spot_em`、get_realtime_quotes: `get_realtime_quotes` 等东财 eastmoney 接口报错问题。
23
+
24
+ ## 安装
25
+
26
+ 1. 将官方 [akshare](https://github.com/akfamily/akshare) 或 [efinance](https://github.com/Micro-sheep/efinance) 升级到最新
27
+
28
+ ```
29
+ # akshare 用户
30
+ pip install upgrade akshare
31
+
32
+ # efinance 用户
33
+ pip install upgrade efinance
34
+ ```
35
+
36
+ 2. 安装最新版本的 `akshare-proxy-patch` 或者 ``
37
+ ```
38
+ pip install akshare-proxy-patch==0.2.5
39
+ ```
40
+
41
+ 最好默认用国外源,国内源不是最新的,安装不上 0.2.5 的可以安装 0.2.4
42
+
43
+ ## 使用
44
+
45
+ 1. `akshare` 和 `efinance` 使用方式一致,在文件顶部添加如下代码
46
+ ```
47
+ # 文件顶部添加
48
+ import akshare_proxy_patch
49
+
50
+ # 参数1: AUTH_IP
51
+ # 参数2: AUTH_TOKEN
52
+ akshare_proxy_patch.install_patch("101.201.173.125", "")
53
+
54
+ # 你的正常业务代码不变
55
+
56
+ # 假如使用akshare
57
+ # import akshare as ak
58
+ # df = ak.stock_zh_a_spot_em()
59
+
60
+ # 假如使用 efinance
61
+ import efinance as ef
62
+ ef.stock.get_realtime_quotes()
63
+ ```
64
+
65
+ ## 目前Hook的接口域名清单
66
+ - fund.eastmoney.com
67
+ - push2.eastmoney.com
68
+ - push2his.eastmoney.com
69
+
70
+ ## 使用问题交流群
71
+
72
+ 如遇到部分接口报错,可进群交流:
73
+
74
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -0,0 +1,54 @@
1
+ # AkShare Proxy Patch
2
+ 针对 AkShare 和 efinance 的底层补丁,自动为东财接口注入代理认证头,从而避免AKShare: `stock_zh_a_spot_em`、get_realtime_quotes: `get_realtime_quotes` 等东财 eastmoney 接口报错问题。
3
+
4
+ ## 安装
5
+
6
+ 1. 将官方 [akshare](https://github.com/akfamily/akshare) 或 [efinance](https://github.com/Micro-sheep/efinance) 升级到最新
7
+
8
+ ```
9
+ # akshare 用户
10
+ pip install upgrade akshare
11
+
12
+ # efinance 用户
13
+ pip install upgrade efinance
14
+ ```
15
+
16
+ 2. 安装最新版本的 `akshare-proxy-patch` 或者 ``
17
+ ```
18
+ pip install akshare-proxy-patch==0.2.5
19
+ ```
20
+
21
+ 最好默认用国外源,国内源不是最新的,安装不上 0.2.5 的可以安装 0.2.4
22
+
23
+ ## 使用
24
+
25
+ 1. `akshare` 和 `efinance` 使用方式一致,在文件顶部添加如下代码
26
+ ```
27
+ # 文件顶部添加
28
+ import akshare_proxy_patch
29
+
30
+ # 参数1: AUTH_IP
31
+ # 参数2: AUTH_TOKEN
32
+ akshare_proxy_patch.install_patch("101.201.173.125", "")
33
+
34
+ # 你的正常业务代码不变
35
+
36
+ # 假如使用akshare
37
+ # import akshare as ak
38
+ # df = ak.stock_zh_a_spot_em()
39
+
40
+ # 假如使用 efinance
41
+ import efinance as ef
42
+ ef.stock.get_realtime_quotes()
43
+ ```
44
+
45
+ ## 目前Hook的接口域名清单
46
+ - fund.eastmoney.com
47
+ - push2.eastmoney.com
48
+ - push2his.eastmoney.com
49
+
50
+ ## 使用问题交流群
51
+
52
+ 如遇到部分接口报错,可进群交流:
53
+
54
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -3,7 +3,7 @@ import threading
3
3
  import requests
4
4
  from requests.adapters import HTTPAdapter
5
5
 
6
- __version__ = "0.2.3"
6
+ __version__ = "0.2.5"
7
7
  # 备份 Session 的原始 request 方法,这是所有 requests.get/post 的最终入口
8
8
  _original_request = requests.Session.request
9
9
  _auth_session = requests.Session()
@@ -85,8 +85,7 @@ def install_patch(auth_ip, auth_token):
85
85
  "https": auth_res["proxy"],
86
86
  }
87
87
 
88
- if "timeout" not in kwargs:
89
- kwargs["timeout"] = 8
88
+ kwargs["timeout"] = 8
90
89
 
91
90
  try:
92
91
  # 调用原始 request 方法
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.4
2
+ Name: akshare-proxy-patch
3
+ Version: 0.2.5
4
+ Summary: 针对 AkShare 和 efinance 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
5
+ Home-page: https://github.com/helloyie/akshare-proxy-patch
6
+ Author: cheapproxy.net
7
+ Author-email: cheapproxy <emezxyj1@gmail.com>
8
+ Project-URL: Homepage, https://github.com/cheapproxy/akshare-proxy-patch
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: requests
16
+ Dynamic: author
17
+ Dynamic: home-page
18
+ Dynamic: license-file
19
+ Dynamic: requires-python
20
+
21
+ # AkShare Proxy Patch
22
+ 针对 AkShare 和 efinance 的底层补丁,自动为东财接口注入代理认证头,从而避免AKShare: `stock_zh_a_spot_em`、get_realtime_quotes: `get_realtime_quotes` 等东财 eastmoney 接口报错问题。
23
+
24
+ ## 安装
25
+
26
+ 1. 将官方 [akshare](https://github.com/akfamily/akshare) 或 [efinance](https://github.com/Micro-sheep/efinance) 升级到最新
27
+
28
+ ```
29
+ # akshare 用户
30
+ pip install upgrade akshare
31
+
32
+ # efinance 用户
33
+ pip install upgrade efinance
34
+ ```
35
+
36
+ 2. 安装最新版本的 `akshare-proxy-patch` 或者 ``
37
+ ```
38
+ pip install akshare-proxy-patch==0.2.5
39
+ ```
40
+
41
+ 最好默认用国外源,国内源不是最新的,安装不上 0.2.5 的可以安装 0.2.4
42
+
43
+ ## 使用
44
+
45
+ 1. `akshare` 和 `efinance` 使用方式一致,在文件顶部添加如下代码
46
+ ```
47
+ # 文件顶部添加
48
+ import akshare_proxy_patch
49
+
50
+ # 参数1: AUTH_IP
51
+ # 参数2: AUTH_TOKEN
52
+ akshare_proxy_patch.install_patch("101.201.173.125", "")
53
+
54
+ # 你的正常业务代码不变
55
+
56
+ # 假如使用akshare
57
+ # import akshare as ak
58
+ # df = ak.stock_zh_a_spot_em()
59
+
60
+ # 假如使用 efinance
61
+ import efinance as ef
62
+ ef.stock.get_realtime_quotes()
63
+ ```
64
+
65
+ ## 目前Hook的接口域名清单
66
+ - fund.eastmoney.com
67
+ - push2.eastmoney.com
68
+ - push2his.eastmoney.com
69
+
70
+ ## 使用问题交流群
71
+
72
+ 如遇到部分接口报错,可进群交流:
73
+
74
+ ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -4,15 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "akshare-proxy-patch" # 包名,需在 PyPI 唯一
7
- version = "0.2.3"
7
+ version = "0.2.5"
8
8
  authors = [
9
9
  { name="cheapproxy", email="emezxyj1@gmail.com" },
10
10
  ]
11
- description = "针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。"
11
+ description = "针对 AkShare 和 efinance 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.7"
14
14
  dependencies = [
15
- "akshare",
16
15
  "requests",
17
16
  ]
18
17
  classifiers = [
@@ -5,10 +5,10 @@ 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.2.3", # 版本号
8
+ version="0.2.5",
9
9
  author="cheapproxy.net",
10
10
  author_email="emezxyj1@gmail.com",
11
- description="AkShare 报错全局Hook",
11
+ description="AkShare 和 efinance 报错全局Hook",
12
12
  long_description=long_description,
13
13
  long_description_content_type="text/markdown",
14
14
  url="https://github.com/helloyie/akshare-proxy-patch", # 项目主页
@@ -1,63 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: akshare-proxy-patch
3
- Version: 0.2.3
4
- Summary: 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
5
- Home-page: https://github.com/helloyie/akshare-proxy-patch
6
- Author: cheapproxy.net
7
- Author-email: cheapproxy <emezxyj1@gmail.com>
8
- Project-URL: Homepage, https://github.com/cheapproxy/akshare-proxy-patch
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: akshare
16
- Requires-Dist: requests
17
- Dynamic: author
18
- Dynamic: home-page
19
- Dynamic: license-file
20
- Dynamic: requires-python
21
-
22
- # AkShare Proxy Patch
23
- 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
24
-
25
- ## 安装
26
-
27
- ```
28
- pip install --upgrade akshare-proxy-patch
29
- ```
30
-
31
- ## 使用
32
-
33
- 1. 登录 https://cheapproxy.net,获取授权码 `AUTH_IP` 和 `AUTH_TOKEN`
34
-
35
- 2. 将 akshare 升级到最新
36
-
37
- ```
38
- pip install --upgrade akshare
39
- ```
40
-
41
- 3. 在使用 akshare 文件顶部添加下面的内容
42
- ```
43
- # 文件顶部添加
44
- import akshare_proxy_patch
45
-
46
- akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
47
-
48
- # 你的正常业务代码......
49
- # import akshare as ak
50
- # df = ak.stock_zh_a_spot_em()
51
- ```
52
-
53
- ## 目前Hook的接口域名清单
54
- - fund.eastmoney.com
55
- - push2.eastmoney.com
56
- - push2his.eastmoney.com
57
-
58
- ## TODO
59
- - 多线程情况下容易出现问题,需暂时不使用多线程或减少线程数
60
-
61
- ## 使用问题交流群
62
-
63
- ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -1,42 +0,0 @@
1
- # AkShare Proxy Patch
2
- 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
3
-
4
- ## 安装
5
-
6
- ```
7
- pip install --upgrade akshare-proxy-patch
8
- ```
9
-
10
- ## 使用
11
-
12
- 1. 登录 https://cheapproxy.net,获取授权码 `AUTH_IP` 和 `AUTH_TOKEN`
13
-
14
- 2. 将 akshare 升级到最新
15
-
16
- ```
17
- pip install --upgrade akshare
18
- ```
19
-
20
- 3. 在使用 akshare 文件顶部添加下面的内容
21
- ```
22
- # 文件顶部添加
23
- import akshare_proxy_patch
24
-
25
- akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
26
-
27
- # 你的正常业务代码......
28
- # import akshare as ak
29
- # df = ak.stock_zh_a_spot_em()
30
- ```
31
-
32
- ## 目前Hook的接口域名清单
33
- - fund.eastmoney.com
34
- - push2.eastmoney.com
35
- - push2his.eastmoney.com
36
-
37
- ## TODO
38
- - 多线程情况下容易出现问题,需暂时不使用多线程或减少线程数
39
-
40
- ## 使用问题交流群
41
-
42
- ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)
@@ -1,63 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: akshare-proxy-patch
3
- Version: 0.2.3
4
- Summary: 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
5
- Home-page: https://github.com/helloyie/akshare-proxy-patch
6
- Author: cheapproxy.net
7
- Author-email: cheapproxy <emezxyj1@gmail.com>
8
- Project-URL: Homepage, https://github.com/cheapproxy/akshare-proxy-patch
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: akshare
16
- Requires-Dist: requests
17
- Dynamic: author
18
- Dynamic: home-page
19
- Dynamic: license-file
20
- Dynamic: requires-python
21
-
22
- # AkShare Proxy Patch
23
- 针对 AkShare 的底层补丁,自动为东财等接口注入代理认证头,从而避免 `stock_zh_a_spot_em` 等方法报错。
24
-
25
- ## 安装
26
-
27
- ```
28
- pip install --upgrade akshare-proxy-patch
29
- ```
30
-
31
- ## 使用
32
-
33
- 1. 登录 https://cheapproxy.net,获取授权码 `AUTH_IP` 和 `AUTH_TOKEN`
34
-
35
- 2. 将 akshare 升级到最新
36
-
37
- ```
38
- pip install --upgrade akshare
39
- ```
40
-
41
- 3. 在使用 akshare 文件顶部添加下面的内容
42
- ```
43
- # 文件顶部添加
44
- import akshare_proxy_patch
45
-
46
- akshare_proxy_patch.install_patch("AUTH_IP", "AUTH_TOKEN")
47
-
48
- # 你的正常业务代码......
49
- # import akshare as ak
50
- # df = ak.stock_zh_a_spot_em()
51
- ```
52
-
53
- ## 目前Hook的接口域名清单
54
- - fund.eastmoney.com
55
- - push2.eastmoney.com
56
- - push2his.eastmoney.com
57
-
58
- ## TODO
59
- - 多线程情况下容易出现问题,需暂时不使用多线程或减少线程数
60
-
61
- ## 使用问题交流群
62
-
63
- ![8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp](https://cdn.nodeimage.com/i/8jmzvNOjKWFzwNUDW0Xiytcpfr50uMr5.webp)