mns-common 1.5.0.0__py3-none-any.whl → 1.5.0.1__py3-none-any.whl

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 mns-common might be problematic. Click here for more details.

@@ -16,6 +16,7 @@ def stock_k_line_hist(
16
16
  end_date: str = "20500101",
17
17
  adjust: str = "",
18
18
  timeout: float = None,
19
+ proxies: str = None
19
20
  ) -> pd.DataFrame:
20
21
  """
21
22
  东方财富网-行情首页-沪深京 A 股-每日行情
@@ -32,6 +33,9 @@ def stock_k_line_hist(
32
33
  :type adjust: str
33
34
  :param timeout: choice of None or a positive float number
34
35
  :type timeout: float
36
+ :param proxies: 代理ip
37
+ :type proxies: str
38
+
35
39
  :return: 每日行情
36
40
  :rtype: pandas.DataFrame
37
41
  """
@@ -49,7 +53,12 @@ def stock_k_line_hist(
49
53
  "end": end_date,
50
54
  "_": "1623766962675",
51
55
  }
52
- r = requests.get(url, params=params, timeout=timeout)
56
+
57
+ if proxies is None:
58
+
59
+ r = requests.get(url, params=params, timeout=timeout)
60
+ else:
61
+ r = requests.get(url, params=params, proxies=proxies, timeout=timeout)
53
62
  data_json = r.json()
54
63
  if not (data_json["data"] and data_json["data"]["klines"]):
55
64
  return pd.DataFrame()
@@ -103,4 +112,5 @@ if __name__ == '__main__':
103
112
  "19700101",
104
113
  "20500101",
105
114
  "",
115
+ None,
106
116
  None)
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns-common
3
- Version: 1.5.0.0
3
+ Version: 1.5.0.1
4
4
 
@@ -22,7 +22,7 @@ mns_common/api/em/real_time/east_money_stock_us_api.py,sha256=RiTrdZDuDgTOtiMSD1
22
22
  mns_common/api/hk/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
23
23
  mns_common/api/hk/ths_hk_company_info_api.py,sha256=Cxlbuccopa0G1s8o0uTnnyLn2QaxOvbDpJQJOj7J8a8,5360
24
24
  mns_common/api/k_line/__init__.py,sha256=itoGlqKhsx7EVXQoD1vchDKQ5GPB16vDjofTSuQtrXg,161
25
- mns_common/api/k_line/stock_k_line_data_api.py,sha256=v27p4qU0bhBGp2t8bZDnyMz20a71GduhmK7uylt6GH4,3496
25
+ mns_common/api/k_line/stock_k_line_data_api.py,sha256=oOtgSRik-F36FWdcWVIRlyYC2rCePvmZEjONFh1yjkk,3724
26
26
  mns_common/api/k_line/stock_minute_data_api.py,sha256=FNe9I_lvgdyEsKQVzdA0vZ5CWeB-KGtJiCpj0YPRuwY,5322
27
27
  mns_common/api/kpl/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
28
28
  mns_common/api/kpl/common/__init__.py,sha256=8b2PuXJM5fLoq71cWPXp695czQuaRtyR6OVHajGjDPc,161
@@ -157,7 +157,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
157
157
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
158
158
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
159
159
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
160
- mns_common-1.5.0.0.dist-info/METADATA,sha256=IfmvN3ruv14dfxYsXxtMkERL2hI584IhQTift1UztOw,61
161
- mns_common-1.5.0.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
162
- mns_common-1.5.0.0.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
163
- mns_common-1.5.0.0.dist-info/RECORD,,
160
+ mns_common-1.5.0.1.dist-info/METADATA,sha256=s39Ru9_jwa3fZ315Ua1TJAyY-RoWdtrZwilleSyjI40,61
161
+ mns_common-1.5.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
162
+ mns_common-1.5.0.1.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
163
+ mns_common-1.5.0.1.dist-info/RECORD,,