Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
MrIbrahem committed Apr 14, 2024
1 parent 2b5ed28 commit adf6f25
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
17 changes: 17 additions & 0 deletions fix_mass/fix_sets/bots/has_url.py
Original file line number Diff line number Diff line change
@@ -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()
2 changes: 1 addition & 1 deletion fix_mass/fix_sets/bots/study_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
# ---
Expand Down
4 changes: 3 additions & 1 deletion fix_mass/fix_sets/fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -93,7 +94,8 @@ def work_one_study(study_id):
# ---
if text.find("|http") != -1:
printe.output(f"<<red>> text has http links... study_id: {study_id}")
printe.output(text)
has_url_append(study_id)
# printe.output(text)
return
# ---
if not text:
Expand Down

0 comments on commit adf6f25

Please sign in to comment.