Skip to main content

Akshare 引入 Proxy 代理解决 IP 被限问题

安装部署

# 安装python安装工具
pip install setuptools
pip install 
python setup.py check
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload --repository testpypi dist/*
twine upload --repository pypi dist/*

pip install akshare-proxy==1.17.87.dev0

pip install --upgrade --index-url https://test.pypi.org/simple/ akshare-proxy==1.17.87.dev2

## 本地调试安装
pip install .

验证安装

import akshare as ak
print(ak.__version__)

代理配置

from akshare.utils.context import AkshareConfig
import akshare as ak

""" 创建代理字典 """
proxies = {
    "http": "http://xxx.con:xxx",
    "https": "https://xxx.con:xxx"
}
""" 创建代理字典 """
AkshareConfig.set_proxies(proxies)

stock_sse_summary_df = ak.stock_sse_summary()
print(stock_sse_summary_df)

IP 代理搭建

免费代理

https://github.com/AlexLiue/proxy_pool

收费代理

https://cheapproxy.net/

代码更新管理脚本备注

# 克隆项目
git clone https://github.com/AlexLiue/akshare.git
# 查看分支
git remote -v

# 添加上游仓库地址
git remote add upstream https://github.com/akfamily/akshare.git

# 合并上游更新到本地项目 (先本地创建合并分支,然后合并)
git checkout develop
git fetch upstream
git merge upstream/main

# 提交
git add .
git commit -m '20250401'

# 合并更新到主分支
git checkout main
git pull origin main
git merge develop

# 提交主分支
git add .
git commit -m '20250401'
git tag v0.0.1
git push  origin master

Metadata

Release files for akshare-proxy 1.17.88

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akshare-proxy 1.17.88
File Size Uploaded
akshare_proxy-1.17.88.tar.gz 852.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akshare-proxy 1.17.88
File Interpreter ABI Platform
akshare_proxy-1.17.88-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / akshare_proxy-1.17.88.tar.gz

Download URL akshare_proxy-1.17.88.tar.gz
Size 852.4 kB
Tags Source
SHA-256 checksum
How to use checksums
78d6319fd370b91805a8d3ba4f2973be613770eee51a98a950da83dc13a3523e
BLAKE2b-256 checksum
How to use checksums
b1ee3e940ab1ec278ad53934a8c7b04dbb8e71f36e49c871a5cec7c9696690fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / akshare_proxy-1.17.88-py3-none-any.whl

Download URL akshare_proxy-1.17.88-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d92cb9b301982915fbed46530ef5512322baca58acf6f19f8e83e24d7eac61c9
BLAKE2b-256 checksum
How to use checksums
49f61d087dda16a5db5920f554acc7f89c5d307c379952f147d014428038cee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.17.88 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page