{
	"1": {
		"0": {
			"unit_index": 0,
			"line_task_name": "쿠팡_고양이저금통"
		},
		"1": {
			"unit_index": 1,
			"combo_search_site": "https://coupang.com",
			"check_auto_paste": false
		},
		"2": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "input",
			"combo_filter_attr": "id",
			"combo_filter_op": "EQ",
			"combo_filter_item": "headerSearchKeyword"
		},
		"3": {
			"unit_index": 4,
			"check_auto_peste": false,
			"plain_keywords": "동전먹는 고양이 저금통 동전",
			"combo_keyword_type": "첫항목만 선택",
			"general_unit_widget_height": 82,
			"general_plain_keywords_height": 52
		},
		"4": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "a",
			"combo_filter_attr": "id",
			"combo_filter_op": "EQ",
			"combo_filter_item": "headerSearchBtn"
		},
		"5": {
			"unit_index": 5,
			"combo_key_click_key": "Mouse.CLICK",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"6": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 낮은 가격에서 높은 가격순으로",
			"check_endof_task": false
		},
		"7": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "label",
			"combo_filter_attr": "for",
			"combo_filter_op": "EQ",
			"combo_filter_item": "sorter-salePriceAsc"
		},
		"8": {
			"unit_index": 5,
			"combo_key_click_key": "Mouse.CLICK",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"9": {
			"unit_index": 11,
			"plain_scripts": "# 작업 데이터프레임 생성\nu9.df_result=pd.DataFrame()\n\n# 컬럼 헤더 생성\nif 'keyword' not in u9.df_result.columns: u9.df_result['keyword']='' * len(u9.df_result)\nif 'cur_time' not in u9.df_result.columns: u9.df_result['cur_time']='' * len(u9.df_result)\nif 'price' not in u9.df_result.columns: u9.df_result['price']='' * len(u9.df_result)\nif 'product_name' not in u9.df_result.columns: u9.df_result['product_name']='' * len(u9.df_result)\n\n# 작업 이미지 저장 폴더 생성\nu9.cur_date= datetime.now().strftime('%y%m%d%H%M%S')\nu9.file_path='@OPATH/coopang_' + u3.ID.get('line_keyword','').replace(' ','_') + '_' + u9.cur_date\nif not os.path.isdir(u9.file_path): os.makedirs(u9.file_path)",
			"general_unit_widget_height": 202,
			"general_plain_scripts_height": 172
		},
		"10": {
			"unit_index": 9,
			"line_time_break": "2",
			"line_time_script": "# 상품목록 36개 추출",
			"check_endof_task": false
		},
		"11": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "li",
			"combo_filter_attr": "class",
			"combo_filter_op": "EQ",
			"combo_filter_item": "search-product "
		},
		"12": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 키워드, 현재시간, 가격 항목 추출",
			"check_endof_task": false
		},
		"13": {
			"unit_index": 10,
			"line_left_side": "len(u11.el)",
			"combo_operator": "==",
			"line_rigt_side": "0",
			"line_jump_number": "35",
			"line_jump_total": "9999"
		},
		"14": {
			"unit_index": 3,
			"line_filter_type": 1,
			"combo_filter_tag": "strong",
			"combo_filter_attr": "class",
			"combo_filter_op": "EQ",
			"combo_filter_item": "price-value"
		},
		"15": {
			"unit_index": 6,
			"line_txtextr_pool": "'{@KEYWORD}','{@CUR_TIME}=cur_time',text=price",
			"general_unit_widget_height": 114,
			"general_plain_txtextr_house_height": 52,
			"general_hor_plain_txtextr_house_height": 52
		},
		"16": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 상품명, 상품코드 추출",
			"check_endof_task": false
		},
		"17": {
			"unit_index": 3,
			"line_filter_type": 1,
			"combo_filter_tag": "div",
			"combo_filter_attr": "class",
			"combo_filter_op": "EQ",
			"combo_filter_item": "name"
		},
		"18": {
			"unit_index": 6,
			"line_txtextr_pool": "text=product_name",
			"general_unit_widget_height": 114,
			"general_plain_txtextr_house_height": 52,
			"general_hor_plain_txtextr_house_height": 52
		},
		"19": {
			"unit_index": 3,
			"line_filter_type": 1,
			"combo_filter_tag": "a",
			"combo_filter_attr": "data-product-id",
			"combo_filter_op": "EQ",
			"combo_filter_item": ""
		},
		"20": {
			"unit_index": 6,
			"line_txtextr_pool": "data-product-id=product_code",
			"general_unit_widget_height": 114,
			"general_plain_txtextr_house_height": 52,
			"general_hor_plain_txtextr_house_height": 52
		},
		"21": {
			"unit_index": 11,
			"plain_scripts": "# 컬럼명 지정\nu15.df.columns=['keyword', 'cur_time', 'price']\nu18.df.columns=['product_name']\nu20.df.columns=['product_code']\n\n# 작업 데이터프레임에 목록 결과 저장\nfor ii in range(len(u18.df)):\n\tcode=u20.df.iat[ii,0]\n\tu9.df_result.at[code,'keyword']=u15.df.iat[ii,0]\n\tu9.df_result.at[code,'cur_time']=u15.df.iat[ii,1]\n\tu9.df_result.at[code,'price']=u15.df.iat[ii,2]\n\tu9.df_result.at[code,'product_name']=u18.df.iat[ii,0]",
			"general_unit_widget_height": 162,
			"general_plain_scripts_height": 132
		},
		"22": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 상품별 세부 이미지 추출 시작",
			"check_endof_task": false
		},
		"23": {
			"unit_index": 5,
			"combo_key_click_key": "Mouse.CLICK",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"24": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "div",
			"combo_filter_attr": "class",
			"combo_filter_op": "EQ",
			"combo_filter_item": "prod-image__items"
		},
		"25": {
			"unit_index": 3,
			"line_filter_type": 1,
			"combo_filter_tag": "img",
			"combo_filter_attr": "src",
			"combo_filter_op": "EQ",
			"combo_filter_item": ""
		},
		"26": {
			"unit_index": 6,
			"line_txtextr_pool": "src",
			"general_unit_widget_height": 174,
			"general_plain_txtextr_house_height": 112,
			"general_hor_plain_txtextr_house_height": 112
		},
		"27": {
			"unit_index": 11,
			"plain_scripts": "u26.code=str()\nu26.url=@BROWSER.current_url.split('/')\nu26.code=u26.url[-1]\nfor path in u26.url:\n\tif path.find('itemId=')>=0:\n\t\tu26.code=path.split('?')[0]\n\t\tbreak\nprint(u26.code)\n\nu26.thumb0=u26.df.iat[0,0].replace('48x48','')\nu26.thumb1=u26.df.iat[1,0].replace('48x48','')\nu26.thumb2=u26.df.iat[2,0].replace('48x48','')\nu26.thumb3=u26.df.iat[3,0].replace('48x48','')\nu26.thumb4=u26.df.iat[4,0].replace('48x48','')\nu26.thumb5=u26.df.iat[5,0].replace('48x48','')\n\nu27.current_url=@BROWSER.current_url\nprint(u27.current_url)",
			"general_unit_widget_height": 222,
			"general_plain_scripts_height": 192
		},
		"28": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 본문 이미지 추출",
			"check_endof_task": false
		},
		"29": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "img",
			"combo_filter_attr": "src",
			"combo_filter_op": "LIKE",
			"combo_filter_item": "http://image"
		},
		"30": {
			"unit_index": 6,
			"line_txtextr_pool": "src",
			"general_unit_widget_height": 154,
			"general_plain_txtextr_house_height": 92,
			"general_hor_plain_txtextr_house_height": 92
		},
		"31": {
			"unit_index": 5,
			"combo_key_click_key": "Keys.Backward",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"32": {
			"unit_index": 9,
			"line_time_break": "0",
			"line_time_script": "# 추출된 항목 데이터프레임으로 조합",
			"check_endof_task": false
		},
		"33": {
			"unit_index": 11,
			"plain_scripts": "print('썸네일 이미지 컬럼 생성')\nif 'thumb0' not in u9.df_result.columns: u9.df_result['thumb0']= [''] * len(u9.df_result)\nif 'thumb1' not in u9.df_result.columns: u9.df_result['thumb1']= [''] * len(u9.df_result)\nif 'thumb2' not in u9.df_result.columns: u9.df_result['thumb2']= [''] * len(u9.df_result)\nif 'thumb3' not in u9.df_result.columns: u9.df_result['thumb3']= [''] * len(u9.df_result)\nif 'thumb4' not in u9.df_result.columns: u9.df_result['thumb3']= [''] * len(u9.df_result)\nif 'thumb5' not in u9.df_result.columns: u9.df_result['thumb3']= [''] * len(u9.df_result)\n\n\nprint('썸네일 이미지 컬럼에 경로 저장')\nu9.df_result.at[u26.code,'thumb0']=u26.thumb0\nu9.df_result.at[u26.code,'thumb1']=u26.thumb1\nu9.df_result.at[u26.code,'thumb2']=u26.thumb2\nu9.df_result.at[u26.code,'thumb3']=u26.thumb3\nu9.df_result.at[u26.code,'thumb3']=u26.thumb4\nu9.df_result.at[u26.code,'thumb3']=u26.thumb5\n\nprint('본문 이미지별 컬럼 생성 후 저장')\nfor ii in range(len(U30.df)):\n    col_name = f'bodyimg{ii}'\n\tif col_name not in u9.df_result.columns: u9.df_result[col_name]= [''] * len(u9.df_result)\n\tu9.df_result.at[u26.code, col_name]=U30.df.iat[ii,0]\n\nprint('상품코드별 이미지 저장 폴더 생성')\nu33.prod_path=u9.file_path + '/' + u26.code\nif not os.path.isdir(u33.prod_path): os.makedirs(u33.prod_path)\n\nprint('썸네일 이미지 URL 다운로드')\nfor ii in range(6):\n\turl=eval(f'u26.thumb{ii}')\n\tu33.download_media_file(url, u33.prod_path)\n\nprint('본문 이미지 다운로드')\nfor ii in range(len(U30.df)):\n\turl= eval(f'U30.df.iat[{ii},0]')\n\tu33.download_media_file(url, u33.prod_path)\n\nprint('이미지 폴더 컬럼 생성 후 저장')\nif 'media_path' not in u9.df_result.columns: u9.df_result['media_path']= [''] * len(u9.df_result)\nu9.df_result.at[u26.code,'media_path']='file://' + u33.prod_path\n\nprint('상세 URL 컬럼 생성 후 저장')\nif 'url' not in u9.df_result.columns: u9.df_result['url']= [''] * len(u9.df_result)\nu9.df_result.at[u26.code,'url']=u27.current_url",
			"general_unit_widget_height": 202,
			"general_plain_scripts_height": 172
		},
		"34": {
			"unit_index": 10,
			"line_left_side": "len(u23.kl)",
			"combo_operator": ">",
			"line_rigt_side": "0",
			"line_jump_number": "23",
			"line_jump_total": "9999"
		},
		"35": {
			"unit_index": 9,
			"line_time_break": "2",
			"line_time_script": "# 다음 페이지로 이동",
			"check_endof_task": false
		},
		"36": {
			"unit_index": 5,
			"combo_key_click_key": "Keys.PAGEUP",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"37": {
			"unit_index": 5,
			"combo_key_click_key": "Keys.PAGEDOWN",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "5"
		},
		"38": {
			"unit_index": 2,
			"line_filter_type": 0,
			"combo_filter_tag": "div",
			"combo_filter_attr": "class",
			"combo_filter_op": "EQ",
			"combo_filter_item": "search-pagination"
		},
		"39": {
			"unit_index": 3,
			"line_filter_type": 1,
			"combo_filter_tag": "a",
			"combo_filter_attr": "text",
			"combo_filter_op": "GT",
			"combo_filter_item": "@PAGENO"
		},
		"40": {
			"unit_index": 6,
			"line_txtextr_pool": "text",
			"general_unit_widget_height": 114,
			"general_plain_txtextr_house_height": 52,
			"general_hor_plain_txtextr_house_height": 52
		},
		"41": {
			"unit_index": 5,
			"combo_key_click_key": "Mouse.CLICK",
			"line_offset_xpos": "0",
			"line_offset_ypos": "0",
			"line_key_wait": "0",
			"line_key_repeat": "1"
		},
		"42": {
			"unit_index": 11,
			"plain_scripts": "@PAGENO += 1",
			"general_unit_widget_height": 82,
			"general_plain_scripts_height": 52
		},
		"43": {
			"unit_index": 10,
			"line_left_side": "int(u40.df.iat[0,0])",
			"combo_operator": "==",
			"line_rigt_side": "@PAGENO",
			"line_jump_number": "10",
			"line_jump_total": "5"
		},
		"44": {
			"unit_index": 11,
			"plain_scripts": "# 추출된 쿠팡 상품 목록을 csv 파일로 저장\nu36.df_result=pd.DataFrame()\nfor column in u9.df_result.columns:\n\tu36.df_result=pd.concat([u36.df_result, u9.df_result[column]], axis=1)\n\n# 파일로 저장하기\nu21.file_name=u9.file_path + '/coopang_' + u3.ID.get('line_keyword','').replace(' ', '_') + '_' + u9.cur_date + '.csv'\n\nheader= False if os.path.isfile(u21.file_name) else True\nu36.df_result.to_csv(u21.file_name, mode='a', header=header, index=True, encoding='utf-8-sig')",
			"general_unit_widget_height": 162,
			"general_plain_scripts_height": 132
		},
		"45": {
			"unit_index": 9,
			"line_time_break": "2",
			"line_time_script": "# 쿠팡 데이터 수집 끝",
			"check_endof_task": false
		},
		"46": {
			"unit_index": 11,
			"plain_scripts": "print(u9.df_result['media_path'])",
			"general_unit_widget_height": 82,
			"general_plain_scripts_height": 52
		}
	}
}