New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一次抓取多筆代號股票之31日交易資料? #41
Comments
You can try this:
I don't think it's a good idea to allow |
thanks you are right I will maintain a local dataset instead by the way , the time limitation of connections of twes seems to be 3times/5sec |
Yeah, it's very easy to be banned by TWSE. I always add a 1~5s random sleep between each request. |
我很好奇 一般限制是單位時間裡的連線數 |
我有想過這個問題,不過沒有測試過 |
要如何作到不重建 connection 但是可以換查詢? |
我不知道 我後來自已寫了一套
… Ming-Hsuan-Tu ***@***.***> 於 2019年3月7日 下午8:48 寫道:
@chingwen823 <https://github.com/chingwen823>
要如何作到不重建 connection 但是可以換查詢?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#41 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APCdodOuldHZqYfXBEZ2g3M_2Ek2T3NOks5vUQqPgaJpZM4Tc3cG>.
|
那真的不重建連線就能一直查下去不被封嗎 |
有沒有一次抓取的方法?
ex. restock.Stock(['2330','6515'])
try with list got en error back:
stock = twstock.Stock(stocknum)
2
stock
TypeError Traceback (most recent call last)
in ()
----> 1 stock = twstock.Stock(stocknum)
2 stock
~/Library/Python/3.6/lib/python/site-packages/twstock/stock.py in init(self, sid, initial_fetch)
133 def init(self, sid: str, initial_fetch: bool=True):
134 self.sid = sid
--> 135 self.fetcher = TWSEFetcher() if codes[sid].market == '上市' else TPEXFetcher()
136 self.raw_data = []
137 self.data = []
TypeError: unhashable type: 'list'
The text was updated successfully, but these errors were encountered: