minor corrections
This commit is contained in:
@@ -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}")
|
||||
|
Reference in New Issue
Block a user