Comments (3)
我想嘗試先更新
self.assertCountEqual(
mock.get_stock_info('2330').keys(),
['msgArray', 'referer', 'userDelay', 'rtcode', 'queryTime', 'rtmessage', 'exKey', 'cachedAlive'])
from twstock.
https://app.travis-ci.com/github/LorneWu/twstock/jobs/542408327
遇到這個問題,我看起來是去比較 最新的價格是否是 214.50
self.assertEqual(s['realtime']['latest_trade_price'], '214.50')
self.assertEqual(s['realtime']['best_bid_price'],
['214.00', '213.50', '213.00', '212.50', '212.00'])
這部分我想改成
# match 100 ~ 999
self.assertRegex(s['realtime']['latest_trade_price'], "[0-9]{3}\.[0-9]+")
for index in range(5):
# match 100 ~ 999
self.assertRegex(s['realtime']['best_bid_price'][index], "[0-9]{3}\.[0-9]+")
from twstock.
Fixed in #125, thanks.
from twstock.
Related Issues (20)
- twstock.realtime.get() 查無資料 HOT 19
- 有提供盤中零股五檔報價功能嗎
- fetch 時間頗久
- 股票 1102 抓取1年內的資料遇到問題
- 抓取00878 30日收盤價 出現錯誤 HOT 1
- 取得資料和預期的不一致(證交所問題) HOT 2
- realtime 的 latest_trade_price 並未顯示查詢時最後的成交價 HOT 1
- 連線嘗試失敗 HOT 3
- SSL: CERTIFICATE_VERIFY_FAILED HOT 2
- realtime SSL issue HOT 1
- 我第一次要執行,發現股票清單比較舊,執行twstock -U卻始終timeout HOT 1
- stockcode '00878', '6669' 讀不到 HOT 2
- http.client.RemoteDisconnected: Remote end closed connection without response
- 請問可以查詢ETF嗎 HOT 4
- 抓取大盤指數
- 查詢代號:1795時程式會出現錯誤 HOT 6
- realtime的latest_trade_price股價為 '-'
- Config file pyproject.toml does not exist after $flit init HOT 2
- 60日線 跟 240日線 無法顯示 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twstock.