DPR-blocked-sites/update.py
Maxim Slipenko b748fb1c96 Добавляет IP-диапазоны Google (#1)
Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
Reviewed-on: #1
2022-09-16 15:15:04 +00:00

23 lines
477 B
Python

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