diff --git a/fix_mass/fix_sets/bots/has_url.py b/fix_mass/fix_sets/bots/has_url.py new file mode 100644 index 00000000..8616a4a5 --- /dev/null +++ b/fix_mass/fix_sets/bots/has_url.py @@ -0,0 +1,17 @@ +""" + +from fix_mass.fix_sets.bots.has_url import has_url_append + +""" +from pathlib import Path + +Dir = Path(__file__).parent.parent + +studies_done_dir = Dir / "has_url" +if not studies_done_dir.exists(): + studies_done_dir.mkdir() + +def has_url_append(study_id): + file = studies_done_dir / f"{study_id}.h" + if not file.exists(): + file.touch() diff --git a/fix_mass/fix_sets/bots/study_files.py b/fix_mass/fix_sets/bots/study_files.py index f6244c87..bc0a5046 100644 --- a/fix_mass/fix_sets/bots/study_files.py +++ b/fix_mass/fix_sets/bots/study_files.py @@ -41,7 +41,7 @@ def filter_members(cat_members): if not se: printe.output(f"!{x}") not_match += 1 - # continue + continue # --- study_id = se.group(1) # --- diff --git a/fix_mass/fix_sets/fix.py b/fix_mass/fix_sets/fix.py index 150da1d7..c04b5c2e 100644 --- a/fix_mass/fix_sets/fix.py +++ b/fix_mass/fix_sets/fix.py @@ -7,7 +7,7 @@ import json import sys from pathlib import Path -import xxlimited +# import xxlimited from newapi import printe from fix_mass.fix_sets.bots.get_img_info import one_img_info @@ -17,6 +17,7 @@ from fix_mass.fix_sets.bots.mv_files import to_move_work from fix_mass.fix_sets.jsons.files import studies_titles, studies_titles2 from fix_mass.fix_sets.bots.done import studies_done_append, find_done #find_done(study_id) +from fix_mass.fix_sets.bots.has_url import has_url_append from newapi.ncc_page import MainPage as ncc_MainPage @@ -93,7 +94,12 @@ def work_one_study(study_id): # --- if text.find("|http") != -1: printe.output(f"<> text has http links... study_id: {study_id}") - printe.output(text) + has_url_append(study_id) + # printe.output(text) + return + # --- + if not text: + printe.output(f"<> text is empty... study_id: {study_id}") return # --- text = to_move_work(text, to_move)