DPR-blocked-sites/update.py

21 lines
440 B
Python
Raw Normal View History

2022-08-26 13:02:52 +03:00
import glob
import importlib
import os
2022-08-26 13:02:52 +03:00
import subprocess
import sys
RUNNER_FOLDER = 'runners'
scripts = glob.glob(f"./{RUNNER_FOLDER}/*.py")
2022-08-26 13:02:52 +03:00
scripts.sort()
modules = [os.path.basename(x)[:-3] for x in scripts]
for m in modules:
runner = importlib.import_module('.' + m, package=RUNNER_FOLDER)
runner.main()
2022-08-26 13:02:52 +03:00
'''
2022-08-26 13:02:52 +03:00
for script in scripts:
runner = importlib.import_module('.' + script[:3], package=__name__)
runner.main()
'''