From 7c75116c5b9a8cb6725a581b18db3b0b9d02eacc Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 10 Apr 2023 16:15:13 +0200 Subject: [PATCH] add url list --- import_export_canalblog.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/import_export_canalblog.py b/import_export_canalblog.py index 817c905..3a6c748 100644 --- a/import_export_canalblog.py +++ b/import_export_canalblog.py @@ -68,12 +68,17 @@ if __name__ == '__main__': exit(1) basic = HTTPBasicAuth(args.user, password) - importWp = WPImport.WPimport(basic, args.wordpress, logger, args.parser) + wordpress = args.wordpress.split(",") + importWp = WPImport.WPimport(basic, "", logger, args.parser) if len(args.file) > 0: - importWp.fromFile(args.file.split(",")) + for i in wordpress: + importWp.setUrl(i) + importWp.fromFile(args.file.split(",")) exit(0) if len(args.directory) > 0: - importWp.fromDirectory(args.directory) + for i in wordpress: + importWp.setUrl(i) + importWp.fromDirectory(args.directory) exit(0) if len(args.canalblog) > 0: exportWp = WPExport.WPExport("", logger, args.parser, args.directory)