mns-common 1.5.2.0__py3-none-any.whl → 1.5.2.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.

@@ -59,8 +59,17 @@ def get_kzz_count(pn, proxies, page_size, time_out):
59
59
  else:
60
60
  r = requests.get(url, params, proxies=proxies, timeout=time_out)
61
61
  data_text = r.text
62
- total_number = int(data_json['data']['total'])
63
- return total_number
62
+ try:
63
+ begin_index_total = data_text.index('"total":')
64
+
65
+ end_index_total = data_text.index('"diff"')
66
+ global max_number
67
+ max_number = int(data_text[begin_index_total + 8:end_index_total - 1])
68
+ return max_number
69
+ except Exception as e:
70
+ logger.error(f"获取第{pn}页可转债列表异常: {e}")
71
+ return 0
72
+
64
73
  except Exception as e:
65
74
  logger.error("获取可转债列表,实时行情异常:{}", e)
66
75
  return 0
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns-common
3
- Version: 1.5.2.0
3
+ Version: 1.5.2.1
4
4
 
@@ -6,7 +6,7 @@ mns_common/api/em/concept/em_concept_index_api.py,sha256=PP87ES8a_y0o3SKLzBsPrc7
6
6
  mns_common/api/em/gd/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
7
7
  mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py,sha256=I2-JjFjTjvOxjNAPzuJ1GK7ynvwJcZa_EbmRB2_pmm0,11813
8
8
  mns_common/api/em/real_time/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
9
- mns_common/api/em/real_time/east_money_debt_api.py,sha256=Ou97aq3-N7lge_Nj6FjkJo76agAhTLaz-Df-BK4dA0c,17483
9
+ mns_common/api/em/real_time/east_money_debt_api.py,sha256=j6LnAG4bowEVXaor10zhao0kPksjH0mj4_tx_tNSH9o,17808
10
10
  mns_common/api/em/real_time/east_money_etf_api.py,sha256=wv1Ae3ydWDZkhlGgCKO8-z-PQj3qRSvoN75xNna4Qcs,19392
11
11
  mns_common/api/em/real_time/east_money_stock_a_api.py,sha256=6xYcNJyMhFFL2eNxQ9c0TbQ53wgumNovVHisXgQX7bs,12737
12
12
  mns_common/api/em/real_time/east_money_stock_a_v2_api.py,sha256=mL4uuL6sVsC2Vnl09826AUnzxePGAUhlZ7I5BBFw8Ks,14530
@@ -152,7 +152,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
152
152
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
153
153
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
154
154
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
155
- mns_common-1.5.2.0.dist-info/METADATA,sha256=9O5_xcBozjOjz8fieymneWRrTLt4eb7mFIb8DUs_3C4,61
156
- mns_common-1.5.2.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
157
- mns_common-1.5.2.0.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
158
- mns_common-1.5.2.0.dist-info/RECORD,,
155
+ mns_common-1.5.2.1.dist-info/METADATA,sha256=QClqUpaY3sKBsy_Zc1HLW8WKv_FDUXeUoPFAO4VBPQg,61
156
+ mns_common-1.5.2.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
157
+ mns_common-1.5.2.1.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
158
+ mns_common-1.5.2.1.dist-info/RECORD,,