import requests import numpy as np import pandas as pd
link = 'https://quality.data.gov.tw/dq_download_json.php?nid=11549&md5_url=bb878d47ffbe7b83bfc1b41d0b24946e' r = requests.get(link) data = pd.DataFrame(r.json())
根據〈Free Stock Data for Python Using Yahoo Finance API〉.)的說法,Yahoo Finance的API的限制為:Using the Public API (without authentication), you are limited to 2,000 requests per hour per IP (or up to a total of 48,000 requests a day)。在我用以下的code抓取1116支股票的歷史記錄後,確實沒有被阻擋的問題。