コード例 #1
0
 def put(self):
     req_goodscode = request.form["goodscode"]
     if req_goodscode is None:
         return {"Error": "Unexpected form error"}
     image_parsing_manager = get_ipbk_object(watcher, request)
     image_parsing_manager.put_goodscode(req_goodscode)
     return "Put"
コード例 #2
0
        def post(self):
            # print(request.remote_addr)

            req_category = request.form["category"]
            req_keyword = request.form["keyword"]
            req_page = request.form["page"]

            if req_page is None or req_keyword is None or req_category is None:
                return {"Error": "Unexpected form error"}

            # ipbk = image_parsing_manager
            # page = 4
            # keyword = '기본셔츠
            # category = '400000076/500001266/600005249'
            ipbk = get_ipbk_object(watcher, request)
            ipbk.request_query(category=req_category, keyword=req_keyword, page=req_page)
            ipbk.get_items_in_page()
            item_dicts = ipbk.get_item_url_check()
            item_dicts_key = item_dicts.keys()
            html_item_card = ""
            for goodscode in item_dicts_key:
                html_item_card = html_item_card + imageBoxMaker(goodscode=goodscode)

            html_header = "<div class='row'>"
            html_footer = "</div>"
            html_code = html_header + html_item_card + html_footer
            return html_code
コード例 #3
0
        def post(self):
            req_basepath = request.form["basepath"]
            req_categorname = request.form["categoryname"]
            if req_basepath is None or req_categorname is None:
                return {"Error": "Unexpected form error"}

            image_parsing_manager = get_ipbk_object(watcher, request)
            items_dict = copy.deepcopy(image_parsing_manager.get_itemlist())
            item_remove_dict = copy.deepcopy(
                image_parsing_manager.get_delete_item_list())

            image_download_manager = get_imdo_object(watcher, request)
            # image_download_manager = ImageDownloader("Downloader")
            image_download_manager.create_folders(req_basepath,
                                                  req_categorname)
            image_download_manager.get_item_dict(items_dict, item_remove_dict)
            image_download_manager.image_download()

            return "Downloaded"
コード例 #4
0
 def get(self):
     image_parsing_manager = get_ipbk_object(watcher, request)
     itemlist = image_parsing_manager.get_delete_item_list()
     return str(itemlist)