Skip to content

Commit

Permalink
Merge pull request shidenggui#102 from saperpsh/master
Browse files Browse the repository at this point in the history
  • Loading branch information
shidenggui authored Jan 21, 2022
2 parents 01d7f87 + 461c56b commit 4177563
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion easyquotation/jsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,11 @@ def cb(self, min_volume=0):
# 添加当前的ctime
self.__cb_url = self.__cb_url.format(ctime=int(time.time()))
# 请求数据
rep = requests.get(self.__cb_url)
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36',
'Cookie':'在你的浏览器里找到cookie'}
session = requests.Session()
rep = session.get(self.__cb_url,headers=headers)
# 获取返回的json字符串
fundjson = json.loads(rep.text)
# 格式化返回的json字符串
Expand Down

0 comments on commit 4177563

Please sign in to comment.