letylin / pyptbook

金融大數據二部曲, 書名: Python 網頁程式交易APP實作~Web + MySQL + Django. 讀者可以在此下載教學資源含課本範例、程式更新等資訊. 歡迎讀者對本書有任何疑問, 在此討論。
44 stars 33 forks source link

14. Google Finance 問題 #3

Open wanchunwing opened 6 years ago

wanchunwing commented 6 years ago

為何我跟隨書上的教學從Google Finance匯入資料庫, https://finance.google.com/finance/historical?q=TPE:3008&startdate=Jan%201%2C%292917&enddate=Jan%2016%2C%202018&num=200&ei=yA5eWrHINoqe0QTmhKCIAw&start=200

========= Google 那邊像是禁止了這: 在網址列上打上會出現 We're sorry...

... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

See Google Help for more information.

在code內運行出現

HTTP Error 403: Forbidden
Internal Server Error: /E_14_2_Py/
Traceback (most recent call last):
  File "/Users/andrewwan/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py", line 1945, in get_loc
    return self._engine.get_loc(key)
  File "pandas/index.pyx", line 137, in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)
  File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
  File "pandas/hashtable.pyx", line 675, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)
  File "pandas/hashtable.pyx", line 683, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)
KeyError: 'dates'

......

你好: google finance 服務已於4月上旬關閉對外的服務, 請到Code頁面, 我有放yahoo finance的爬蟲程式. 請改用此程式.

letylin commented 5 years ago

github的討論參與者您好! 您在這邊的留言我們比較難在第一時間收到資訊, 所以在這邊邀請您加入我們的LINE@ 1對1聊天群組, 您可以在LINE上討論有關於書中的問題, 讓我們能快速知道您的疑問並與您討論!

LINE@ID:@iex5378o ★☆★使用手機者點選以下網址或使用電腦者掃描以下QRCode立即加入群組★☆★ https://line.me/R/ti/p/%40iex5378o

line