rquote 0.2.4__py3-none-any.whl → 0.2.6__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.
rquote/__init__.py CHANGED
@@ -10,5 +10,6 @@ Copyright (c) 2021 Roi ZHAO
10
10
  from .main import get_price, get_stock_concepts, get_concept_stocks, get_bk_stocks
11
11
  from .main import get_all_concepts, get_all_industries
12
12
  from .main import get_cn_stock_list, get_hk_stocks_hsi, get_hk_stocks_ggt
13
+ from .main import get_cn_future_list, get_us_stocks_biggest, get_cn_fund_list
13
14
  from .utils import WebUtils, BasicFactors
14
15
  from .plots import PlotUtils
rquote/main.py CHANGED
@@ -192,7 +192,6 @@ def get_price(i, sdate='', edate='', freq='day', days=320, fq='qfq',
192
192
  raise ValueError('target market not supported')
193
193
  a = hget(url)
194
194
  #a = json.loads(a.text.replace('kline_dayqfq=', ''))['data'][i]
195
- print('=====',url,a)
196
195
  a = json.loads(a.text)['data'][i]
197
196
  name = ''
198
197
  try:
rquote/utils.py CHANGED
@@ -52,7 +52,7 @@ class WebUtils:
52
52
  return header
53
53
 
54
54
  @classmethod
55
- def reqget(cls, url, headers, method, proxy=None):
55
+ def http_get(cls, url, headers, method, proxy=None):
56
56
  '''
57
57
  request.get() wrapper
58
58
  '''
@@ -187,7 +187,8 @@ class hget:
187
187
  self.url = url
188
188
  try:
189
189
  r = httpx.get(
190
- self.url, follow_redirects=True, *args, **kwargs)
190
+ self.url, follow_redirects=True, headers=WebUtils.headers(),
191
+ *args, **kwargs)
191
192
  self.text = r.text
192
193
  self.content = r.content
193
194
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rquote
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Mostly day quotes of cn/hk/us/fund/future markets, side with quote list fetch
5
5
  Home-page: https://github.com/kids/rquote
6
6
  Author: Roizhao
@@ -10,6 +10,7 @@ Description-Content-Type: text/markdown
10
10
  Requires-Dist: httpx>=0.20.0
11
11
  Requires-Dist: pandas>=1.0.0
12
12
  Requires-Dist: setuptools>=59.6.0
13
+ Requires-Dist: twine>=3.8.0
13
14
  Dynamic: author
14
15
  Dynamic: author-email
15
16
  Dynamic: home-page
@@ -0,0 +1,8 @@
1
+ rquote/__init__.py,sha256=RmJldXUSwytbaIoML4H4DHU_-oWzrTcwnLGXrLVQFzM,451
2
+ rquote/main.py,sha256=2qoFZN1d9TU89rEZj5SEWRh9X86DT6B9xkTY47L4dNs,17083
3
+ rquote/plots.py,sha256=N8uvD6ju9tow0DllPQiXiM7EoPC2bK8X7QF6NQainKs,2342
4
+ rquote/utils.py,sha256=v8j8R2xoXyTsHSAWXD7x2FUV7w1a4xgfswfSDdfg5p8,6827
5
+ rquote-0.2.6.dist-info/METADATA,sha256=zu1H9gPSzD8hARNDK82MWDCR26bYroFMJKDLxE1-s3s,1457
6
+ rquote-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ rquote-0.2.6.dist-info/top_level.txt,sha256=CehAiaZx7Fo8HGoV2zd5GhILUW1jQEN8YS-cWMlrK9Y,7
8
+ rquote-0.2.6.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- rquote/__init__.py,sha256=kduE8uV71sC878gc4HpRqlzfAJc4cHEKk6HsQkHQ52s,373
2
- rquote/main.py,sha256=CoZ1EBGSbSJ1422wotxWKXAjaGjVAZwMDnmIsz9iAeE,17108
3
- rquote/plots.py,sha256=N8uvD6ju9tow0DllPQiXiM7EoPC2bK8X7QF6NQainKs,2342
4
- rquote/utils.py,sha256=ztDIlW9UyJQHPO_Q-DCzp0sOsKT24sFdHhpizw3P9x8,6781
5
- rquote-0.2.4.dist-info/METADATA,sha256=fgz-6BYaAoNPavmoT_N3kTelOOa7N8Z1-vugUtQPJtM,1429
6
- rquote-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- rquote-0.2.4.dist-info/top_level.txt,sha256=CehAiaZx7Fo8HGoV2zd5GhILUW1jQEN8YS-cWMlrK9Y,7
8
- rquote-0.2.4.dist-info/RECORD,,
File without changes