From a39e2200bd8948987c40be3b47231d99c913a4ec Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 22 Apr 2023 00:07:54 +0200 Subject: [PATCH] add function --- import_export_canalblog.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/import_export_canalblog.py b/import_export_canalblog.py index 6470699..7526190 100644 --- a/import_export_canalblog.py +++ b/import_export_canalblog.py @@ -2,11 +2,23 @@ from requests.auth import HTTPBasicAuth from getpass import getpass from urllib.parse import urlparse -import argparse, logging +import argparse, logging, threading + from lib.WPImport import WPimport from lib.WPExport import WPExport +def download(exportWp, html, img): + webpage = exportWp.getUrlPage() + if html is False: + exportWp.downloadHTML(webpage) + + if args.img is False: + exportWp.downloadImg(webpage) + + + + if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--debug", help="Verbosity", action="store_true")