akshare 1.15.52__tar.gz → 1.15.54__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 might be problematic. Click here for more details.
- {akshare-1.15.52 → akshare-1.15.54}/PKG-INFO +1 -1
- {akshare-1.15.52 → akshare-1.15.54}/akshare/__init__.py +3 -1
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/cons.py +0 -24
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_index_ccidx.py +6 -3
- akshare-1.15.54/akshare/futures/futures_inventory_99.py +86 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_sy_em.py +2 -2
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_three_report_em.py +16 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare.egg-info/PKG-INFO +1 -1
- {akshare-1.15.52 → akshare-1.15.54}/akshare.egg-info/SOURCES.txt +0 -1
- akshare-1.15.52/akshare/futures/futures_inventory_99.py +0 -297
- akshare-1.15.52/akshare/futures/inventory_data.py +0 -100
- {akshare-1.15.52 → akshare-1.15.54}/LICENSE +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/README.md +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/air_hebei.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/air_zhenqi.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/crypto.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/outcrypto.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/air/sunrise_tad.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/epu_index.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/ff_factor.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/fred_md.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/article/risk_rv.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bank/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bank/bank_cbirc_2020.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bank/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_cb_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_cb_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_cbond.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_china.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_china_money.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_convert.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_info_cm.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_issue_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_nafmii.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_summary.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_zh_cov.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/bond_zh_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/bond/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/cal/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/cal/rv.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/cost/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/cost/cost_living.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/crypto/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/crypto/crypto_bitcoin_cme.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/crypto/crypto_hold.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/currency/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/currency/currency.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/currency/currency_china_bank_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/currency/currency_safe.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/data/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/data/cninfo.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/data/crypto_info.zip +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/data/ths.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/datasets.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_australia.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_bank.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_canada.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_china.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_china_hk.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_china_nbs.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_constitute.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_euro.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_finance_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_germany.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_info_ws.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_japan.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_other.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_swiss.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_uk.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/macro_usa.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/economic/marco_cnbs.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/energy/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/energy/energy_carbon.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/energy/energy_oil_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/event/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/event/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/event/migration.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/exceptions.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/file_fold/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/file_fold/calendar.json +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/fortune_500.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/fortune_bloomberg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/fortune_forbes_500.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/fortune_hurun.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fortune/fortune_xincaifu_500.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_amac.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_announcement.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_aum_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_etf_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_etf_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_etf_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_fhsp_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_init_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_lof_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_manager.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_portfolio_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_position_lg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_rank_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_rating.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_report_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_scale_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_scale_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fund/fund_xq.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/cot.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_basis.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_comex_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_comm_ctp.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_comm_qihuo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_contract_detail.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_daily_bar.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_foreign.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_hf_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_hq_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_inventory_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_news_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_news_shmet.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_roll_yield.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_rule.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_settlement_price_sgx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_spot_stock_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_stock_js.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_to_spot.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_warehouse_receipt.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/futures_zh_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/receipt.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/requests_fun.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures/symbol_var.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_cffex.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_czce.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_dce.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_gfex.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_ine.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_contract_info_shfe.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_cot_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_hog.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_index_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/futures_derivative/futures_spot_sys.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fx/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fx/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fx/currency_investing.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fx/fx_quote.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/fx/fx_quote_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/hf/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/hf/hf_sp500.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_cflp.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_cni.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_cx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_drewry.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_eri.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_hog.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_kq_fz.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_kq_ss.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_option_qvix.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_research_fund_sw.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_research_sw.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_spot.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_stock_hk.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_stock_us_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_stock_zh.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_stock_zh_csindex.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_sugar.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_sw.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_yw.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_zh_a_scope.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/index/index_zh_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/interest_rate/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/interest_rate/interbank_rate_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/movie/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/movie/artist_yien.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/movie/jm.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/movie/movie_yien.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/movie/video_yien.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/news/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/news/news_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/news/news_cctv.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/news/news_stock.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/nlp/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/nlp/nlp_interface.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_comm_qihuo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_commodity.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_commodity_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_czce.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_daily_stats_sse_szse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_finance.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_finance_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_lhb_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_premium_analysis_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_risk_analysis_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_risk_indicator_sse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/option/option_value_analysis_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/other/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/other/other_car_cpca.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/other/other_car_gasgoo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/pro/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/pro/client.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/pro/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/pro/data_pro.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qdii/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qdii/qdii_jsl.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc/qhkc_api.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc_web/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc_web/qhkc_fund.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc_web/qhkc_index.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/qhkc_web/qhkc_tool.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/rate/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/rate/repo_rate.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/reits/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/reits/reits_basic.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/request.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/sport/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/sport/sport_olympic.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/spot/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/spot/spot_hog_soozhu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/spot/spot_price_qh.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/spot/spot_sge.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_allotment_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_ask_bid_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_board_concept_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_board_industry_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_cg_equity_mortgage.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_cg_guarantee.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_cg_lawsuit.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_dividend_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_dzjy_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_fund_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_fund_hold.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_gsrl_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hk_famous.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hk_fhpx_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hk_hot_rank_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hk_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hold_control_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hold_control_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hold_num_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hot_rank_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hot_search_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_hot_up_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_industry.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_industry_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_industry_pe_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_industry_sw.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_info.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_info_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_intraday_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_intraday_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_ipo_summary_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_new_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_news_cx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_profile_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_rank_forecast.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_repurchase_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_share_changes_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_share_hold.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_stop.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_summary.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_us_famous.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_us_js.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_us_pink.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_us_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_weibo_nlp.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_xq.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_a_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_a_special.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_a_tick_tx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_ah_tx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_b_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_kcb_report.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock/stock_zh_kcb_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_a_below_net_asset_statistics.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_a_high_low.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_a_indicator.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_a_pe_and_pb.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_account_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_all_pb.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_analyst_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_board_industry_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_buffett_index_lg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_classify_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_comment_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_concept_futu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_congestion_lg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_cyq_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_disclosure_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_dxsyl_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_ebs_lg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_esg_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_fhps_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_fhps_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_fund_flow.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gddh_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gdfx_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gdhs.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gdzjc_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gpzy_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_gxl_lg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hist_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hist_tx.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hk_valuation_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hot_xq.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hsgt_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hsgt_exchange_rate.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_hsgt_min_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_info.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_inner_trade_xq.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_irm_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_jgdy_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_lh_yybpm.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_lhb_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_lhb_sina.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_margin_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_margin_sse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_margin_szse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_market_legu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_pankou_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_qsjy_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_report_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_research_report_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_sns_sseinfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_technology_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_tfp_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_ttm_lyr.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_value_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_wencai.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_yjbb_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_yjyg_cninfo.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_yjyg_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_yzxdr_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_zdhtmx_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_zf_pg.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_zh_valuation_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_zh_vote_baidu.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/stock_ztb_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_feature/ths.js +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_finance.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_finance_hk.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_finance_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_hold.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_ipo_declare.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_kcb_detail_sse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_kcb_sse.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_mda_ym.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_notice.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_profit_forecast_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_profit_forecast_hk_etnet.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_profit_forecast_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_recommend.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_register_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_restricted_em.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_zygc.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/stock_fundamental/stock_zyjs_ths.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/tool/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/tool/trade_date_hist.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/cons.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/context.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/demjson.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/func.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/token_process.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare/utils/tqdm.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare.egg-info/dependency_links.txt +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare.egg-info/requires.txt +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/akshare.egg-info/top_level.txt +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/pyproject.toml +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/setup.cfg +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/setup.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/tests/__init__.py +0 -0
- {akshare-1.15.52 → akshare-1.15.54}/tests/test_func.py +0 -0
|
@@ -2962,9 +2962,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2962
2962
|
1.15.50 fix: fix stock_gpzy_profile_em interface
|
|
2963
2963
|
1.15.51 fix: fix stock_gpzy_pledge_ratio_em interface
|
|
2964
2964
|
1.15.52 fix: fix stock_zh_index_hist_csindex interface
|
|
2965
|
+
1.15.53 fix: fix futures_inventory_99 interface
|
|
2966
|
+
1.15.54 fix: fix stock_sy_profile_em interface
|
|
2965
2967
|
"""
|
|
2966
2968
|
|
|
2967
|
-
__version__ = "1.15.
|
|
2969
|
+
__version__ = "1.15.54"
|
|
2968
2970
|
__author__ = "AKFamily"
|
|
2969
2971
|
|
|
2970
2972
|
import sys
|
|
@@ -64,30 +64,6 @@ inventory_temp_headers = {
|
|
|
64
64
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36",
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
sample_headers = {
|
|
68
|
-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
|
|
69
|
-
"Host": "service.99qh.com",
|
|
70
|
-
"Origin": "http://service.99qh.com",
|
|
71
|
-
"Referer": "http://www.99qh.com/d/store.aspx",
|
|
72
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36",
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
qh_headers = {
|
|
76
|
-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
|
77
|
-
"Accept-Encoding": "gzip, deflate",
|
|
78
|
-
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
|
|
79
|
-
"Cache-Control": "no-cache",
|
|
80
|
-
"Connection": "keep-alive",
|
|
81
|
-
"Content-Length": "8429",
|
|
82
|
-
"Content-Type": "application/x-www-form-urlencoded",
|
|
83
|
-
"Host": "service.99qh.com",
|
|
84
|
-
"Origin": "http://service.99qh.com",
|
|
85
|
-
"Pragma": "no-cache",
|
|
86
|
-
"Cookie": "__utma=181566328.985082941.1656754961.1656754961.1656754961.1; __utmc=181566328; __utmz=181566328.1656754961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ASP.NET_SessionId=42k0mpzfu3fv5cxqmtrwc20y; tgw_l7_route=b26adbec28f4b4e1f7290033d59c43a7; __utmt=1; __utmb=181566328.2.10.1656754961",
|
|
87
|
-
"Referer": "http://service.99qh.com/Storage/Storage.aspx?page=99qh",
|
|
88
|
-
"Upgrade-Insecure-Requests": "1",
|
|
89
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36",
|
|
90
|
-
}
|
|
91
67
|
# 奇货可查
|
|
92
68
|
QHKC_INDEX_URL = "https://www.qhkch.com/ajax/index_show.php"
|
|
93
69
|
QHKC_INDEX_TREND_URL = "https://qhkch.com/ajax/indexes_trend.php"
|
|
@@ -5,6 +5,7 @@ Date: 2023/11/9 14:00
|
|
|
5
5
|
Desc: 中证商品指数
|
|
6
6
|
http://www.ccidx.com/
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
from io import BytesIO
|
|
9
10
|
|
|
10
11
|
import pandas as pd
|
|
@@ -51,7 +52,7 @@ def futures_index_ccidx(symbol: str = "中证商品期货指数") -> pd.DataFram
|
|
|
51
52
|
temp_df["结算"] = pd.to_numeric(temp_df["结算"], errors="coerce")
|
|
52
53
|
temp_df["涨跌"] = pd.to_numeric(temp_df["涨跌"], errors="coerce")
|
|
53
54
|
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
|
|
54
|
-
temp_df.sort_values(by=[
|
|
55
|
+
temp_df.sort_values(by=["日期"], inplace=True)
|
|
55
56
|
temp_df.reset_index(inplace=True, drop=True)
|
|
56
57
|
return temp_df
|
|
57
58
|
|
|
@@ -60,7 +61,8 @@ def futures_index_min_ccidx(symbol: str = "中证监控油脂油料期货指数"
|
|
|
60
61
|
"""
|
|
61
62
|
中证商品指数-商品指数-分时数据
|
|
62
63
|
http://www.ccidx.com/index.html
|
|
63
|
-
:param symbol: choice of {"中证商品期货指数", "中证商品期货价格指数", "中证监控油脂油料期货指数", "中证监控软商品期货指数",
|
|
64
|
+
:param symbol: choice of {"中证商品期货指数", "中证商品期货价格指数", "中证监控油脂油料期货指数", "中证监控软商品期货指数",
|
|
65
|
+
"中证监控能化期货指数", "中证监控钢铁期货指数"}
|
|
64
66
|
:type symbol: str
|
|
65
67
|
:return: 商品指数-分时数据
|
|
66
68
|
:rtype: pandas.DataFrame
|
|
@@ -93,7 +95,8 @@ def futures_index_min_ccidx(symbol: str = "中证监控油脂油料期货指数"
|
|
|
93
95
|
"Pragma": "no-cache",
|
|
94
96
|
"Proxy-Connection": "keep-alive",
|
|
95
97
|
"Referer": "http://www.ccidx.com/cscidx/quote1",
|
|
96
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
98
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
99
|
+
"Chrome/92.0.4515.159 Safari/537.36",
|
|
97
100
|
"X-Requested-With": "XMLHttpRequest",
|
|
98
101
|
}
|
|
99
102
|
r = requests.post(url, params=params, data=payload, headers=headers)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding:utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Date: 2024/12/23 20:00
|
|
5
|
+
Desc: 99 期货网-大宗商品库存数据
|
|
6
|
+
https://www.99qh.com/
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
from functools import lru_cache
|
|
11
|
+
from datetime import datetime
|
|
12
|
+
import pandas as pd
|
|
13
|
+
import requests
|
|
14
|
+
from bs4 import BeautifulSoup
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@lru_cache(maxsize=32)
|
|
18
|
+
def __get_99_symbol_map() -> pd.DataFrame:
|
|
19
|
+
"""
|
|
20
|
+
99 期货网-品种代码对照表
|
|
21
|
+
https://www.99qh.com/data/stockIn?productId=12
|
|
22
|
+
:return: 品种代码对照表
|
|
23
|
+
:rtype: pandas.DataFrame
|
|
24
|
+
"""
|
|
25
|
+
url = "https://www.99qh.com/data/stockIn"
|
|
26
|
+
r = requests.get(url)
|
|
27
|
+
soup = BeautifulSoup(r.text, features="lxml")
|
|
28
|
+
raw_data = soup.find(attrs={"id": "__NEXT_DATA__"}).text
|
|
29
|
+
data_json = json.loads(raw_data)
|
|
30
|
+
df_list = []
|
|
31
|
+
for i, item in enumerate(
|
|
32
|
+
data_json["props"]["pageProps"]["data"]["varietyListData"]
|
|
33
|
+
):
|
|
34
|
+
temp_df = pd.DataFrame(
|
|
35
|
+
data_json["props"]["pageProps"]["data"]["varietyListData"][i]["productList"]
|
|
36
|
+
)
|
|
37
|
+
df_list.append(temp_df)
|
|
38
|
+
|
|
39
|
+
big_df = pd.concat(df_list, ignore_index=True)
|
|
40
|
+
return big_df
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def futures_inventory_99(symbol: str = "豆一") -> pd.DataFrame:
|
|
44
|
+
"""
|
|
45
|
+
99 期货网-大宗商品库存数据
|
|
46
|
+
https://www.99qh.com/data/stockIn?productId=12
|
|
47
|
+
:param symbol: 交易所对应的具体品种; 如:大连商品交易所的 豆一
|
|
48
|
+
:type symbol: str
|
|
49
|
+
:return: 大宗商品库存数据
|
|
50
|
+
:rtype: pandas.DataFrame
|
|
51
|
+
"""
|
|
52
|
+
temp_df = __get_99_symbol_map()
|
|
53
|
+
symbol_map = dict(zip(temp_df["name"], temp_df["productId"]))
|
|
54
|
+
|
|
55
|
+
url = "https://centerapi.fx168api.com/app/qh/api/stock/trend"
|
|
56
|
+
headers = {
|
|
57
|
+
"Content-Type": "application/json;charset=UTF-8",
|
|
58
|
+
"_pcc": "SGkj5avwu2h8Rs8/41r2LUwDHeEbaMKWe06+hWcEOO/uAQVbckWBHbwAvFbEI1eBBSvmTNqyjHKfFAn/kCpZ"
|
|
59
|
+
"IU7QNDvTrL2xGkQyuu+EVMU6RnZb/drmVGJRR6VhoHYMmzJvDuR6d43LnY219r44mGeL5x8qSUdh+cHjs0dm0AI=",
|
|
60
|
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
61
|
+
"Chrome/58.0.3029.110 Safari/537.3",
|
|
62
|
+
"referer": "https://www.99qh.com",
|
|
63
|
+
}
|
|
64
|
+
params = {
|
|
65
|
+
"productId": symbol_map[symbol],
|
|
66
|
+
"type": "1",
|
|
67
|
+
"pageNo": "1",
|
|
68
|
+
"pageSize": "4000",
|
|
69
|
+
"startDate": "",
|
|
70
|
+
"endDate": f"{datetime.now().date().isoformat()}",
|
|
71
|
+
"appCategory": "web",
|
|
72
|
+
}
|
|
73
|
+
r = requests.get(url, params, headers=headers)
|
|
74
|
+
data_json = r.json()
|
|
75
|
+
temp_df = pd.DataFrame(data_json["data"]["list"])
|
|
76
|
+
temp_df.columns = ["日期", "收盘价", "库存"]
|
|
77
|
+
temp_df.sort_values(by=["日期"], ignore_index=True, inplace=True)
|
|
78
|
+
temp_df["日期"] = pd.to_datetime(temp_df["日期"], errors="coerce").dt.date
|
|
79
|
+
temp_df["收盘价"] = pd.to_numeric(temp_df["收盘价"], errors="coerce")
|
|
80
|
+
temp_df["库存"] = pd.to_numeric(temp_df["库存"], errors="coerce")
|
|
81
|
+
return temp_df
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
futures_inventory_99_df = futures_inventory_99(symbol="豆一")
|
|
86
|
+
print(futures_inventory_99_df)
|
|
@@ -452,8 +452,8 @@ def stock_sy_hy_em(date: str = "20231231") -> pd.DataFrame:
|
|
|
452
452
|
|
|
453
453
|
|
|
454
454
|
if __name__ == "__main__":
|
|
455
|
-
|
|
456
|
-
print(
|
|
455
|
+
stock_sy_profile_em_df = stock_sy_profile_em()
|
|
456
|
+
print(stock_sy_profile_em_df)
|
|
457
457
|
|
|
458
458
|
stock_sy_yq_em_df = stock_sy_yq_em(date="20240630")
|
|
459
459
|
print(stock_sy_yq_em_df)
|
|
@@ -68,6 +68,8 @@ def stock_balance_sheet_by_report_em(symbol: str = "SH600519") -> pd.DataFrame:
|
|
|
68
68
|
}
|
|
69
69
|
r = requests.get(url, params=params)
|
|
70
70
|
data_json = r.json()
|
|
71
|
+
if "data" not in data_json.keys():
|
|
72
|
+
break
|
|
71
73
|
temp_df = pd.DataFrame(data_json["data"])
|
|
72
74
|
for col in temp_df.columns:
|
|
73
75
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -124,6 +126,8 @@ def stock_balance_sheet_by_yearly_em(symbol: str = "SH600036") -> pd.DataFrame:
|
|
|
124
126
|
}
|
|
125
127
|
r = requests.get(url, params=params)
|
|
126
128
|
data_json = r.json()
|
|
129
|
+
if "data" not in data_json.keys():
|
|
130
|
+
break
|
|
127
131
|
temp_df = pd.DataFrame(data_json["data"])
|
|
128
132
|
for col in temp_df.columns:
|
|
129
133
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -171,6 +175,8 @@ def stock_profit_sheet_by_report_em(symbol: str = "SH600519") -> pd.DataFrame:
|
|
|
171
175
|
}
|
|
172
176
|
r = requests.get(url, params=params)
|
|
173
177
|
data_json = r.json()
|
|
178
|
+
if "data" not in data_json.keys():
|
|
179
|
+
break
|
|
174
180
|
temp_df = pd.DataFrame(data_json["data"])
|
|
175
181
|
for col in temp_df.columns:
|
|
176
182
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -218,6 +224,8 @@ def stock_profit_sheet_by_yearly_em(symbol: str = "SH600519") -> pd.DataFrame:
|
|
|
218
224
|
}
|
|
219
225
|
r = requests.get(url, params=params)
|
|
220
226
|
data_json = r.json()
|
|
227
|
+
if "data" not in data_json.keys():
|
|
228
|
+
break
|
|
221
229
|
temp_df = pd.DataFrame(data_json["data"])
|
|
222
230
|
for col in temp_df.columns:
|
|
223
231
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -267,6 +275,8 @@ def stock_profit_sheet_by_quarterly_em(
|
|
|
267
275
|
}
|
|
268
276
|
r = requests.get(url, params=params)
|
|
269
277
|
data_json = r.json()
|
|
278
|
+
if "data" not in data_json.keys():
|
|
279
|
+
break
|
|
270
280
|
temp_df = pd.DataFrame(data_json["data"])
|
|
271
281
|
for col in temp_df.columns:
|
|
272
282
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -316,6 +326,8 @@ def stock_cash_flow_sheet_by_report_em(
|
|
|
316
326
|
}
|
|
317
327
|
r = requests.get(url, params=params)
|
|
318
328
|
data_json = r.json()
|
|
329
|
+
if "data" not in data_json.keys():
|
|
330
|
+
break
|
|
319
331
|
temp_df = pd.DataFrame(data_json["data"])
|
|
320
332
|
for col in temp_df.columns:
|
|
321
333
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -365,6 +377,8 @@ def stock_cash_flow_sheet_by_yearly_em(
|
|
|
365
377
|
}
|
|
366
378
|
r = requests.get(url, params=params)
|
|
367
379
|
data_json = r.json()
|
|
380
|
+
if "data" not in data_json.keys():
|
|
381
|
+
break
|
|
368
382
|
temp_df = pd.DataFrame(data_json["data"])
|
|
369
383
|
for col in temp_df.columns:
|
|
370
384
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -414,6 +428,8 @@ def stock_cash_flow_sheet_by_quarterly_em(
|
|
|
414
428
|
}
|
|
415
429
|
r = requests.get(url, params=params)
|
|
416
430
|
data_json = r.json()
|
|
431
|
+
if "data" not in data_json.keys():
|
|
432
|
+
break
|
|
417
433
|
temp_df = pd.DataFrame(data_json["data"])
|
|
418
434
|
for col in temp_df.columns:
|
|
419
435
|
if temp_df[col].isnull().all(): # 检查列是否包含 None 或 NaN
|
|
@@ -135,7 +135,6 @@ akshare/futures/futures_stock_js.py
|
|
|
135
135
|
akshare/futures/futures_to_spot.py
|
|
136
136
|
akshare/futures/futures_warehouse_receipt.py
|
|
137
137
|
akshare/futures/futures_zh_sina.py
|
|
138
|
-
akshare/futures/inventory_data.py
|
|
139
138
|
akshare/futures/receipt.py
|
|
140
139
|
akshare/futures/requests_fun.py
|
|
141
140
|
akshare/futures/symbol_var.py
|
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# -*- coding:utf-8 -*-
|
|
3
|
-
"""
|
|
4
|
-
Date: 2024/1/10 19:00
|
|
5
|
-
Desc: 99 期货网-大宗商品库存数据
|
|
6
|
-
http://www.99qh.com/d/store.aspx
|
|
7
|
-
"""
|
|
8
|
-
from io import StringIO
|
|
9
|
-
|
|
10
|
-
import pandas as pd
|
|
11
|
-
import requests
|
|
12
|
-
from bs4 import BeautifulSoup
|
|
13
|
-
|
|
14
|
-
from akshare.futures.cons import (
|
|
15
|
-
qh_headers,
|
|
16
|
-
sample_headers,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def futures_inventory_99(
|
|
21
|
-
exchange: str = "大连商品交易所", symbol: str = "豆一"
|
|
22
|
-
) -> pd.DataFrame:
|
|
23
|
-
"""
|
|
24
|
-
99 期货网-大宗商品库存数据
|
|
25
|
-
http://www.99qh.com/d/store.aspx
|
|
26
|
-
:param exchange: 交易所名称; choice of {"上海期货交易所", "郑州商品交易所", "大连商品交易所", "LME", "NYMEX", "CBOT", "NYBOT", "TOCOM", "上海国际能源交易中心", "OSE"}
|
|
27
|
-
:type exchange: str
|
|
28
|
-
:param symbol: 交易所对应的具体品种; 如:大连商品交易所的 豆一
|
|
29
|
-
:type symbol: str
|
|
30
|
-
:return: 大宗商品库存数据
|
|
31
|
-
:rtype: pandas.DataFrame
|
|
32
|
-
"""
|
|
33
|
-
data_code = {
|
|
34
|
-
"1": [
|
|
35
|
-
"1",
|
|
36
|
-
"2",
|
|
37
|
-
"3",
|
|
38
|
-
"12",
|
|
39
|
-
"32",
|
|
40
|
-
"36",
|
|
41
|
-
"37",
|
|
42
|
-
"40",
|
|
43
|
-
"42",
|
|
44
|
-
"47",
|
|
45
|
-
"56",
|
|
46
|
-
"63",
|
|
47
|
-
"69",
|
|
48
|
-
"70",
|
|
49
|
-
"79",
|
|
50
|
-
"85",
|
|
51
|
-
],
|
|
52
|
-
"2": [
|
|
53
|
-
"4",
|
|
54
|
-
"14",
|
|
55
|
-
"29",
|
|
56
|
-
"31",
|
|
57
|
-
"33",
|
|
58
|
-
"38",
|
|
59
|
-
"44",
|
|
60
|
-
"45",
|
|
61
|
-
"50",
|
|
62
|
-
"51",
|
|
63
|
-
"52",
|
|
64
|
-
"55",
|
|
65
|
-
"59",
|
|
66
|
-
"64",
|
|
67
|
-
"66",
|
|
68
|
-
"67",
|
|
69
|
-
"75",
|
|
70
|
-
"76",
|
|
71
|
-
"81",
|
|
72
|
-
"82",
|
|
73
|
-
"87",
|
|
74
|
-
"92",
|
|
75
|
-
"95",
|
|
76
|
-
],
|
|
77
|
-
"3": [
|
|
78
|
-
"6",
|
|
79
|
-
"7",
|
|
80
|
-
"8",
|
|
81
|
-
"15",
|
|
82
|
-
"30",
|
|
83
|
-
"34",
|
|
84
|
-
"35",
|
|
85
|
-
"39",
|
|
86
|
-
"43",
|
|
87
|
-
"53",
|
|
88
|
-
"57",
|
|
89
|
-
"58",
|
|
90
|
-
"61",
|
|
91
|
-
"62",
|
|
92
|
-
"68",
|
|
93
|
-
"80",
|
|
94
|
-
"84",
|
|
95
|
-
"86",
|
|
96
|
-
"88",
|
|
97
|
-
"89",
|
|
98
|
-
"94",
|
|
99
|
-
],
|
|
100
|
-
"4": ["9", "10", "16", "17", "18", "23", "28"],
|
|
101
|
-
"5": ["11", "20", "21"],
|
|
102
|
-
"6": ["13", "24", "25", "26", "27"],
|
|
103
|
-
"7": ["19"],
|
|
104
|
-
"8": ["22"],
|
|
105
|
-
"10": ["78", "83", "90", "93"],
|
|
106
|
-
"11": ["91"],
|
|
107
|
-
}
|
|
108
|
-
data_name = {
|
|
109
|
-
"1": [
|
|
110
|
-
"铜",
|
|
111
|
-
"铝",
|
|
112
|
-
"橡胶",
|
|
113
|
-
"燃料油",
|
|
114
|
-
"锌",
|
|
115
|
-
"黄金",
|
|
116
|
-
"螺纹钢",
|
|
117
|
-
"线材",
|
|
118
|
-
"铅",
|
|
119
|
-
"白银",
|
|
120
|
-
"石油沥青",
|
|
121
|
-
"热轧卷板",
|
|
122
|
-
"锡",
|
|
123
|
-
"镍",
|
|
124
|
-
"纸浆",
|
|
125
|
-
"不锈钢",
|
|
126
|
-
],
|
|
127
|
-
"2": [
|
|
128
|
-
"强麦",
|
|
129
|
-
"一号棉",
|
|
130
|
-
"白糖",
|
|
131
|
-
"PTA",
|
|
132
|
-
"菜籽油",
|
|
133
|
-
"早籼稻",
|
|
134
|
-
"甲醇",
|
|
135
|
-
"普麦",
|
|
136
|
-
"玻璃",
|
|
137
|
-
"油菜籽",
|
|
138
|
-
"菜籽粕",
|
|
139
|
-
"动力煤",
|
|
140
|
-
"粳稻",
|
|
141
|
-
"晚籼稻",
|
|
142
|
-
"硅铁",
|
|
143
|
-
"锰硅",
|
|
144
|
-
"棉纱",
|
|
145
|
-
"苹果",
|
|
146
|
-
"红枣",
|
|
147
|
-
"尿素",
|
|
148
|
-
"纯碱",
|
|
149
|
-
"短纤",
|
|
150
|
-
"花生",
|
|
151
|
-
],
|
|
152
|
-
"3": [
|
|
153
|
-
"豆一",
|
|
154
|
-
"豆二",
|
|
155
|
-
"豆粕",
|
|
156
|
-
"玉米",
|
|
157
|
-
"豆油",
|
|
158
|
-
"聚乙烯",
|
|
159
|
-
"棕榈油",
|
|
160
|
-
"聚氯乙烯",
|
|
161
|
-
"焦炭",
|
|
162
|
-
"焦煤",
|
|
163
|
-
"铁矿石",
|
|
164
|
-
"鸡蛋",
|
|
165
|
-
"胶合板",
|
|
166
|
-
"聚丙烯",
|
|
167
|
-
"玉米淀粉",
|
|
168
|
-
"乙二醇",
|
|
169
|
-
"粳米",
|
|
170
|
-
"苯乙烯",
|
|
171
|
-
"纤维板",
|
|
172
|
-
"液化石油气",
|
|
173
|
-
"生猪",
|
|
174
|
-
],
|
|
175
|
-
"4": ["LME铜", "LME铝", "LME镍", "LME铅", "LME锌", "LME锡", "LME铝合金"],
|
|
176
|
-
"5": ["COMEX铜", "COMEX金", "COMEX银"],
|
|
177
|
-
"6": ["CBOT大豆", "CBOT小麦", "CBOT玉米", "CBOT燕麦", "CBOT糙米"],
|
|
178
|
-
"7": ["NYBOT2号棉"],
|
|
179
|
-
"8": ["TOCOM橡胶"],
|
|
180
|
-
"10": ["原油", "20号胶", "低硫燃料油", "国际铜"],
|
|
181
|
-
"11": ["OSE橡胶"],
|
|
182
|
-
}
|
|
183
|
-
temp_out_exchange_name = {
|
|
184
|
-
"1": "上海期货交易所",
|
|
185
|
-
"2": "郑州商品交易所",
|
|
186
|
-
"3": "大连商品交易所",
|
|
187
|
-
"4": "LME",
|
|
188
|
-
"5": "NYMEX",
|
|
189
|
-
"6": "CBOT",
|
|
190
|
-
"7": "NYBOT",
|
|
191
|
-
"8": "TOCOM",
|
|
192
|
-
"10": "上海国际能源交易中心",
|
|
193
|
-
"11": "OSE",
|
|
194
|
-
}
|
|
195
|
-
exchange_map = {
|
|
196
|
-
value: key for key, value in temp_out_exchange_name.items()
|
|
197
|
-
}
|
|
198
|
-
exchange = exchange_map[exchange]
|
|
199
|
-
temp_symbol_code_map = dict(zip(data_name[exchange], data_code[exchange]))
|
|
200
|
-
symbol = temp_symbol_code_map[symbol]
|
|
201
|
-
out_exchange_name = {
|
|
202
|
-
"1": "上海期货交易所",
|
|
203
|
-
"2": "郑州商品交易所",
|
|
204
|
-
"3": "大连商品交易所",
|
|
205
|
-
"4": "LME",
|
|
206
|
-
"5": "NYMEX",
|
|
207
|
-
"6": "CBOT",
|
|
208
|
-
"7": "NYBOT",
|
|
209
|
-
"8": "TOCOM",
|
|
210
|
-
"10": "上海国际能源交易中心",
|
|
211
|
-
"11": "OSE",
|
|
212
|
-
}
|
|
213
|
-
name_temp_dict = {}
|
|
214
|
-
code_temp_dict = {}
|
|
215
|
-
for num in data_code.keys():
|
|
216
|
-
name_temp_dict[out_exchange_name[num]] = dict(
|
|
217
|
-
zip(data_code[num], data_name[num])
|
|
218
|
-
)
|
|
219
|
-
code_temp_dict[num] = dict(zip(data_code[num], data_name[num]))
|
|
220
|
-
n = 10
|
|
221
|
-
while n != 0:
|
|
222
|
-
try:
|
|
223
|
-
n -= 1
|
|
224
|
-
session = requests.Session()
|
|
225
|
-
url = "http://service.99qh.com/Storage/Storage.aspx"
|
|
226
|
-
params = {"page": "99qh"}
|
|
227
|
-
r = session.post(url, params=params, headers=sample_headers)
|
|
228
|
-
cookie = r.cookies.get_dict()
|
|
229
|
-
url = "http://service.99qh.com/Storage/Storage.aspx"
|
|
230
|
-
params = {"page": "99qh"}
|
|
231
|
-
r = requests.post(
|
|
232
|
-
url, params=params, headers=sample_headers, cookies=cookie
|
|
233
|
-
)
|
|
234
|
-
soup = BeautifulSoup(r.text, "lxml")
|
|
235
|
-
view_state = soup.find_all(attrs={"id": "__VIEWSTATE"})[0]["value"]
|
|
236
|
-
even_validation = soup.find_all(attrs={"id": "__EVENTVALIDATION"})[
|
|
237
|
-
0
|
|
238
|
-
]["value"]
|
|
239
|
-
payload = {
|
|
240
|
-
"__EVENTTARGET": "ddlExchName",
|
|
241
|
-
"__EVENTARGUMENT": "",
|
|
242
|
-
"__LASTFOCUS": "",
|
|
243
|
-
"__VIEWSTATE": view_state,
|
|
244
|
-
"__VIEWSTATEGENERATOR": "6EAC22FA",
|
|
245
|
-
"__EVENTVALIDATION": even_validation,
|
|
246
|
-
"ddlExchName": int(exchange),
|
|
247
|
-
"ddlGoodsName": 1,
|
|
248
|
-
}
|
|
249
|
-
res = requests.post(
|
|
250
|
-
url,
|
|
251
|
-
params={"page": "99qh"},
|
|
252
|
-
data=payload,
|
|
253
|
-
headers=qh_headers,
|
|
254
|
-
cookies=cookie,
|
|
255
|
-
)
|
|
256
|
-
soup = BeautifulSoup(res.text, "lxml")
|
|
257
|
-
view_state = soup.find_all(attrs={"id": "__VIEWSTATE"})[0]["value"]
|
|
258
|
-
even_validation = soup.find_all(attrs={"id": "__EVENTVALIDATION"})[
|
|
259
|
-
0
|
|
260
|
-
]["value"]
|
|
261
|
-
payload = {
|
|
262
|
-
"__EVENTTARGET": "ddlGoodsName",
|
|
263
|
-
"__EVENTARGUMENT": "",
|
|
264
|
-
"__LASTFOCUS": "",
|
|
265
|
-
"__VIEWSTATE": view_state,
|
|
266
|
-
"__VIEWSTATEGENERATOR": "6EAC22FA",
|
|
267
|
-
"__EVENTVALIDATION": even_validation,
|
|
268
|
-
"ddlExchName": int(exchange),
|
|
269
|
-
"ddlGoodsName": int(symbol),
|
|
270
|
-
}
|
|
271
|
-
res = requests.post(
|
|
272
|
-
url,
|
|
273
|
-
params=params,
|
|
274
|
-
data=payload,
|
|
275
|
-
headers=qh_headers,
|
|
276
|
-
cookies=cookie,
|
|
277
|
-
)
|
|
278
|
-
data_df = pd.read_html(StringIO(res.text))[-1].T
|
|
279
|
-
data_df.columns = data_df.iloc[0, :]
|
|
280
|
-
data_df = data_df.iloc[1:, :]
|
|
281
|
-
data_df.reset_index(inplace=True, drop=True)
|
|
282
|
-
data_df.columns.name = None
|
|
283
|
-
data_df["日期"] = pd.to_datetime(data_df["日期"]).dt.date
|
|
284
|
-
data_df["库存"] = pd.to_numeric(data_df["库存"])
|
|
285
|
-
data_df["增减"] = pd.to_numeric(data_df["增减"])
|
|
286
|
-
data_df.sort_values("日期", inplace=True)
|
|
287
|
-
data_df.reset_index(inplace=True, drop=True)
|
|
288
|
-
return data_df
|
|
289
|
-
except:
|
|
290
|
-
continue
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if __name__ == "__main__":
|
|
294
|
-
futures_inventory_99_df = futures_inventory_99(
|
|
295
|
-
exchange="郑州商品交易所", symbol="菜籽油"
|
|
296
|
-
)
|
|
297
|
-
print(futures_inventory_99_df)
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# -*- coding:utf-8 -*-
|
|
3
|
-
"""
|
|
4
|
-
Date: 2021/1/10 13:58
|
|
5
|
-
Desc: 得到 99 期货网的原始数据
|
|
6
|
-
"""
|
|
7
|
-
import requests
|
|
8
|
-
import pickle
|
|
9
|
-
from bs4 import BeautifulSoup
|
|
10
|
-
import time
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
url = "http://service.99qh.com/Storage/Storage.aspx?page=99qh"
|
|
14
|
-
|
|
15
|
-
sample_headers = {
|
|
16
|
-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
|
|
17
|
-
"Host": "service.99qh.com",
|
|
18
|
-
"Origin": "http://service.99qh.com",
|
|
19
|
-
"Referer": "http://www.99qh.com/d/store.aspx",
|
|
20
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
res = requests.get(url, headers=sample_headers)
|
|
24
|
-
|
|
25
|
-
soup = BeautifulSoup(res.text, "lxml")
|
|
26
|
-
view_state = soup.find_all(attrs={"id": "__VIEWSTATE"})[0]["value"]
|
|
27
|
-
even_validation = soup.find_all(attrs={"id": "__EVENTVALIDATION"})[0]["value"]
|
|
28
|
-
|
|
29
|
-
qh_headers = {
|
|
30
|
-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
|
|
31
|
-
"Accept-Encoding": "gzip, deflate",
|
|
32
|
-
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
|
|
33
|
-
"Cache-Control": "max-age=0",
|
|
34
|
-
"Connection": "keep-alive",
|
|
35
|
-
"Content-Length": "4458",
|
|
36
|
-
"Content-Type": "application/x-www-form-urlencoded",
|
|
37
|
-
"Host": "service.99qh.com",
|
|
38
|
-
"Origin": "http://service.99qh.com",
|
|
39
|
-
"Referer": "http://service.99qh.com/Storage/Storage.aspx?page=99qh",
|
|
40
|
-
"Upgrade-Insecure-Requests": "1",
|
|
41
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
code_temp_list = [item["value"] for item in soup.find_all("select")[0].find_all("option")]
|
|
45
|
-
name_temp_list = [item.get_text() for item in soup.find_all("select")[0].find_all("option")]
|
|
46
|
-
code_exchange_name_dict = dict(zip(code_temp_list, name_temp_list))
|
|
47
|
-
exchange_value = soup.find_all("select")[0].find_all(attrs={"selected": "selected"})[0]["value"]
|
|
48
|
-
symbol_list = soup.find_all("select")[1].get_text().split("\n")[1:-1]
|
|
49
|
-
symbol_value_list = [item["value"] for item in soup.find_all("select")[1].find_all("option")]
|
|
50
|
-
code_symbol_code_dict = dict()
|
|
51
|
-
code_symbol_code_dict[exchange_value] = symbol_value_list
|
|
52
|
-
|
|
53
|
-
exchange_symbol_list = {}
|
|
54
|
-
exchange_symbol_value_list = {}
|
|
55
|
-
for i in code_temp_list:
|
|
56
|
-
# i = 14
|
|
57
|
-
print(i)
|
|
58
|
-
j = 0
|
|
59
|
-
while j < 5:
|
|
60
|
-
try:
|
|
61
|
-
payload = {
|
|
62
|
-
"__EVENTTARGET": "ddlExchName",
|
|
63
|
-
"__EVENTARGUMENT": "",
|
|
64
|
-
"__LASTFOCUS": "",
|
|
65
|
-
"__VIEWSTATE": view_state,
|
|
66
|
-
"__VIEWSTATEGENERATOR": "6EAC22FA",
|
|
67
|
-
"__EVENTVALIDATION": even_validation,
|
|
68
|
-
"ddlExchName": i,
|
|
69
|
-
# "ddlGoodsName": 6
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
res = requests.post(url, data=payload, headers=qh_headers)
|
|
73
|
-
soup = BeautifulSoup(res.text, "lxml")
|
|
74
|
-
exchange = soup.find_all("select")[0].find_all(attrs={"selected": "selected"})[0].get_text()
|
|
75
|
-
print(exchange)
|
|
76
|
-
exchange_value = soup.find_all("select")[0].find_all(attrs={"selected": "selected"})[0]["value"]
|
|
77
|
-
print(exchange_value)
|
|
78
|
-
symbol_list = soup.find_all("select")[1].get_text().split("\n")[1:-1]
|
|
79
|
-
exchange_symbol_list.update({exchange_value: symbol_list})
|
|
80
|
-
symbol_value_list = [item["value"] for item in soup.find_all("select")[1].find_all("option")]
|
|
81
|
-
exchange_symbol_value_list.update({exchange_value: symbol_value_list})
|
|
82
|
-
view_state = soup.find_all(attrs={"id": "__VIEWSTATE"})[0]["value"]
|
|
83
|
-
even_validation = soup.find_all(attrs={"id": "__EVENTVALIDATION"})[0]["value"]
|
|
84
|
-
time.sleep(5)
|
|
85
|
-
except:
|
|
86
|
-
j += 1
|
|
87
|
-
continue
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
with open('./akshare/futures/exchange_symbol_list.pk', 'wb') as f:
|
|
91
|
-
pickle.dump(exchange_symbol_list, f)
|
|
92
|
-
|
|
93
|
-
with open('./akshare/futures/exchange_symbol_value_list.pk', 'wb') as f:
|
|
94
|
-
pickle.dump(exchange_symbol_value_list, f)
|
|
95
|
-
|
|
96
|
-
with open('./akshare/futures/code_exchange_name_dict.pk', 'wb') as f:
|
|
97
|
-
pickle.dump(code_exchange_name_dict, f)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
File without changes
|