minor corrections

This commit is contained in:
Remy Moll
2022-06-23 15:05:59 +02:00
parent ac9e988af3
commit 12a7de91ed
13 changed files with 218 additions and 32 deletions

View File

@@ -1,3 +1,4 @@
import time
from waybackpy import WaybackMachineSaveAPI # upload to archive.org
import logging
logger = logging.getLogger(__name__)
@@ -11,6 +12,8 @@ def upload_to_archive(article_object):
archive_url = wayback.save()
# logger.info(f"{url} uploaded to archive successfully")
article_object.archive_url = archive_url
# time.sleep(4) # Archive Uploads rate limited to 15/minute
except Exception as e:
article_object.archive_url = "Error while uploading: {}".format(e)
logger.error(f"Error while generating archive url: {e}")