-
Notifications
You must be signed in to change notification settings - Fork 350
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
Fix bug44 #63
base: master
Are you sure you want to change the base?
Fix bug44 #63
Conversation
twstock/analytics.py
Outdated
def moving_average(self, data, days, skipna=True): | ||
if skipna: | ||
data = [x for x in data if x is not None] | ||
|
||
result = [] | ||
data = data[:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這行可以移到上面那個 if 之後的 else,避免多複製一次 data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯嗯! 我修改過了! 謝謝
@mlouielu hi, 我發現這個沒過的部分是太頻繁的對原始資料網站做 request,導致無法連上,已經不是跟這個議題的程式有關。請問該怎麼解決才能完成這個MR呢? |
請問這個連線有限制嗎 我要抓全部股票31天內的資訊 抓到中間某之就錯誤 還是其他問題 ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '遠端主機已強制關閉一個現存的連線。', None, 10054, None)) |
@hourtest 這個好像 request 太頻繁會被 ban ip |
You can use RoundRobinProxy to prevent this issue.
hourtest <notifications@github.com> 於 2019年11月27日 週三 09:25 寫道:
… 請問這個連線有限制嗎 我要抓全部股票31天內的資訊
抓到中間某之就錯誤 還是其他問題
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#63?email_source=notifications&email_token=AG3QA2EOGGQDC4PEAH7PRV3QVXD23A5CNFSM4HB4VKSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFH64EQ#issuecomment-558886418>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3QA2F5LCCZME5FM3IAEVTQVXD23ANCNFSM4HB4VKSA>
.
|
我嘗試解這個問題, 不確定是不是這樣做