init
This commit is contained in:
@@ -37,6 +37,7 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
slackBot.sendMsg("1. start to crawl...")
|
slackBot.sendMsg("1. start to crawl...")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ERROR_COUNT = 0
|
ERROR_COUNT = 0
|
||||||
while ERROR_COUNT < 3:
|
while ERROR_COUNT < 3:
|
||||||
try:
|
try:
|
||||||
@@ -51,8 +52,10 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
if ERROR_COUNT >= 3:
|
if ERROR_COUNT >= 3:
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
metaCrawler = MetaCrawler(START_DATE)
|
metaCrawler = MetaCrawler(START_DATE)
|
||||||
|
|
||||||
|
|
||||||
ERROR_COUNT = 0
|
ERROR_COUNT = 0
|
||||||
while ERROR_COUNT < 3:
|
while ERROR_COUNT < 3:
|
||||||
try:
|
try:
|
||||||
@@ -93,6 +96,7 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ERROR_COUNT = 0
|
ERROR_COUNT = 0
|
||||||
while ERROR_COUNT < 3:
|
while ERROR_COUNT < 3:
|
||||||
try:
|
try:
|
||||||
@@ -208,5 +212,6 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("time : %6.2f 초", (time.time() - start))
|
print("time : %6.2f 초", (time.time() - start))
|
||||||
print ("done...")
|
print ("done...")
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class MetaCrawler:
|
|||||||
|
|
||||||
for j in range(0, len(html[0].values)):
|
for j in range(0, len(html[0].values)):
|
||||||
item = html[0].values[j]
|
item = html[0].values[j]
|
||||||
if input['NAME'] in ('USD', 'JPY', 'EUR', 'CNY'):
|
if input['NAME'] in ('USD', 'JPY', 'EUR', 'CNY', 'HKD', 'GBP', 'CAD', 'CHF', 'AUD', 'THB', 'INR', 'PHP', 'BRL', 'VND', 'RUB', 'TWD'):
|
||||||
if item[0] <= lastDay:
|
if item[0] <= lastDay:
|
||||||
finish = True
|
finish = True
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user