Example #1
0
    def check_download_page(cls, root_path, companyname, omit_list):
        json = FileFunction.get_param_json(root_path, companyname)
        html = RequestFunction.get_html(json['download_page_url'])
        FileFunction.create_current_html(root_path, companyname, html)
        check_result, message = cls.check_diff_current_and_prev_html(
            root_path, companyname, omit_list)

        return check_result, message
Example #2
0
    def correct_data(cls, root_path, reflesh):
        check_result, message = cls.check_download_page(root_path)

        if check_result is False:
            return message, None

        json = FileFunction.get_param_json(root_path, cls.COMPANY_NAME)
        merged_pkl_path = KyudenService.correct_data(json['url'], root_path,
                                                     reflesh)
        count = QueryService.count(root_path, cls.COMPANY_NAME)

        return count, merged_pkl_path