Comments (7)
You can try this:
stocks = [Stock(symbol) for symbol in ['2330', '6515']]
I don't think it's a good idea to allow Stock(['2330', '6515'])
.
Maybe you can elaborate more on your use case?
from twstock.
thanks you are right
what I trying to do is to compare a group of stocks with another
I will maintain a local dataset instead
by the way , the time limitation of connections of twes seems to be 3times/5sec
from twstock.
Yeah, it's very easy to be banned by TWSE. I always add a 1~5s random sleep between each request.
from twstock.
我很好奇 一般限制是單位時間裡的連線數
如果不重建connection,連線的sesssion沒斷 應該可以一直無限去下查詢??(就不會被ban是嗎?)
from twstock.
我有想過這個問題,不過沒有測試過
另外 user agent 可能也有影響
不知道有沒有人測試過?
from twstock.
要如何作到不重建 connection 但是可以換查詢?
from twstock.
from twstock.
Related Issues (20)
- twstock.realtime.get() 查無資料 HOT 19
- 有提供盤中零股五檔報價功能嗎
- fetch 時間頗久
- 股票 1102 抓取1年內的資料遇到問題
- 抓取00878 30日收盤價 出現錯誤 HOT 1
- 'OutStream' object has no attribute 'readable' HOT 1
- Twstock
- Bypass TWSE request limit using multiple proxies
- Got banned after 4 requests (3 sec gap) HOT 3
- ModuleNotFoundError: No module named 'lxml' HOT 1
- 五日均價內若有空值None 會出現無法判斷(TypeError: unsupported operand type(s) for +: 'int' and 'NoneType')
- 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
- Unittest 總是遇到 AssertError HOT 3
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.