if os.path.isdir(get_path_0): make_file(soup_url, get_path) else: #print('폴더가 없음으로 새로 만들었습니다.') os.makedirs(get_path_0) make_file(soup_url, get_path) #print(str(get_item) + ' 업데이트를 하였습니다.') ###################################################### startTime = time.time() input_items = input_warframe.input_item('weapons') for i, v in enumerate(input_items): item = v.replace('_prime', '/') item = item.title() item = item.replace('And', '&') item = item.replace('/', '_Prime') #print(item) path = '/home/ec2-user/environment/warframets/html/static/image/item_image/weapon/' + item + '/' + item + '.png' path_0 = '/home/ec2-user/environment/warframets/html/static/image/item_image/weapon/' + item save_data = image_crawling(item, path, path_0, 'weapon') endTime = time.time() - startTime print( str(round(i / len(input_items) * 100)) + "% 완료했습니다. 시간: " +
def get_all(): all_item = [] all_path = [] all_path_0 = [] input_items_0 = input_warframe.input_item('warframes') for i, v in enumerate(input_items_0): item = str(v) + '_set' path = '/home/ec2-user/environment/warframets/data/csv/warframe/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/warframe/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_1 = input_warframe.input_item('weapons') for i, v in enumerate(input_items_1): item = str(v) + '_set' path = '/home/ec2-user/environment/warframets/data/csv/weapon/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/weapon/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_2 = input_warframe.input_item('weapons_etc') for i, v in enumerate(input_items_2): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/weapon/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/weapon/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_3 = input_warframe.input_item('aura_mods') for i, v in enumerate(input_items_3): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/mod/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/mod/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_4 = input_warframe.input_item('warframe_mods') for i, v in enumerate(input_items_4): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/mod/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/mod/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_5 = input_warframe.input_item('items_etc') for i, v in enumerate(input_items_5): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/etc/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/etc/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) input_items_6 = input_warframe.input_item('weapon_mods') for i, v in enumerate(input_items_6): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/mod/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/mod/' + item all_item.append(item) all_path.append(path) all_path_0.append(path_0) return all_item, all_path, all_path_0
make_file(get_item2, get_path) print(str(get_item) + ' 업데이트를 하였습니다.') ###################################################### startTime = time.time() """ item = 'primed_rubedo_lined_barrel' path = '/home/ec2-user/environment/warframets/data/csv/mod/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/mod/' + item save_data = warframe_crawling(item, path, path_0) """ input_items = input_warframe.input_item('aura_mods') for i, v in enumerate(input_items): item = str(v) path = '/home/ec2-user/environment/warframets/data/csv/mod/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/mod/' + item save_data = warframe_crawling(item, path, path_0) endTime = time.time() - startTime print( str(round(i / len(input_items) * 100)) + "% 완료했습니다. 시간: " + str(round(endTime)) + "초") input_items = input_warframe.input_item('warframe_mods') for i, v in enumerate(input_items): item = str(v)
value = pandas_value.pandas_value(get_item, 'warframe') value.to_csv(get_path, mode = 'w') #print('새로운 데이터를 저장했습니다.') if os.path.isdir(get_path_0): make_file(get_item, get_path) else: #print('폴더가 없음으로 새로 만들었습니다.') os.makedirs(get_path_0) make_file(get_item, get_path) print(str(get_item) + ' 업데이트를 하였습니다.') ###################################################### startTime = time.time() input_items = input_warframe.input_item('warframes') for i, v in enumerate(input_items): item = str(v) + '_set' path = '/home/ec2-user/environment/warframets/data/csv/warframe/' + item + '/' + item + '.csv' path_0 = '/home/ec2-user/environment/warframets/data/csv/warframe/' + item save_data = warframe_crawling(item, path, path_0) #save_png = data_result.write_plot(item) endTime = time.time() - startTime print(str(round(i / len(input_items) * 100)) + "% 완료했습니다. 시간: " + str(round(endTime)) + "초") print("업데이트가 모두 완료했습니다.") ######################################################
if os.path.isdir(get_path_0): make_file(soup_url, get_path) else: #print('폴더가 없음으로 새로 만들었습니다.') os.makedirs(get_path_0) make_file(soup_url, get_path) print(str(get_item) + ' 업데이트를 하였습니다.') ###################################################### startTime = time.time() input_items = input_warframe.input_item('items_etc') for i, v in enumerate(input_items): item = v.replace('_prime', '/') item = item.title() item = item.replace('/', '_Prime') path = '/workspace/crawling/html/static/image/item_image/etc/' + item + '/' + item + '.png' path_0 = '/workspace/crawling/html/static/image/item_image/etc/' + item save_data = image_crawling(item, path, path_0, 'etc') endTime = time.time() - startTime print( str(round(i / len(input_items) * 100)) + "% 완료했습니다. 시간: " + str(round(endTime)) + "초")