@@ -0,0 +1,778 @@
+from selenium import webdriver%0Aimport pandas as pd%0Aimport requests%0Afrom bs4 import BeautifulSoup%0A%0Adriver = webdriver.Firefox()%0Adriver.set_page_load_timeout(10)%0A%0Awith open('./stock_list.txt', 'r') as fin:%0A    company_code_list = fin.read().split(%22%5Cn%22)%0A    i = 0%0A    for company_code in company_code_list:%0A        i += 1%0A        if i == 1:%0A            continue%0A        print(company_code)%0A        url = %22http://www.cmoney.tw/finance/f00041.aspx?s=%22 + company_code.strip()%0A        #print(url)%0A        driver.get(url)%0A        table = driver.find_element_by_css_selector(%22.tb-out%22)%0A        #print(table.get_attribute('innerHTML'))%0A        df = pd.read_html(table.get_attribute('innerHTML'))%0A        #print(df%5B0%5D)%0A        df%5B0%5D.to_csv('stock_table/'+company_code+'.csv', index=False)%0A

Add stock crawler