from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0
from selenium.webdriver.common.keys import Keys
import time
import os
import configparser
import Utils
def main():
#処理時間計測
start = time.time()
printmessage('処理開始')
#コンフィグ取得
cf = configparser.ConfigParser()
cf.read("config.ini")
out_path = cf.get("Common", "OUT_PATH")
name = cf.get("Common", "ACCOUNT_NAME")
passwd = cf.get("Common", "ACCOUNT_PASS")
#初期処理
#銘柄取得
with open(os.path.join('D:\data\stock','TICKER_SYMBOL.txt'),'r') as f:
symboldatas = f.read().splitlines()
symbols = []
filenames =[]
for s in symboldatas:
tmp = s.split(',')
symbols.append(tmp[1])
filenames.append([tmp[1],tmp[0]+'_'+tmp[1]])
#日付取得
strnow = Utils.getDate(time.localtime())
#フォルダ作成
Utils.setup(symbols)
printmessage('初期処理終了')