Beispiel #1
0
 def run(self):
     """
     data ディレクトリ下の ダウンロード済みの釣果情報 HTML ファイルを
     順に読み込み、釣果情報を抽出して、CSV 形式にして保存します
     """
     html_files = Config.list_download_dirs()
     for html_file in html_files:
         point = Config.get_point_from_html_filename(html_file)
         if not point:
             continue
         _logger.info("read {}".format(html_file))
         html_path = Config.get_download_path(html_file)
         parser = Parser(point).parse_html(html_path)
         self.append(parser)
     self.cleansing_fishing_summary()
     self.export()
def test_get_point_from_html_filename():
    assert Config.get_point_from_html_filename(
        "choka_daikoku_2021_04_001.html") == "daikoku"
    assert Config.get_point_from_html_filename("hoge.html") == None