From af8b9b5fdfd04deac12df809c7835b3c12677692 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 4 Feb 2019 18:53:54 -0800 Subject: [PATCH] use parsed timestamps instead of now --- archivebox/archive.py | 2 +- archivebox/parse.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/archivebox/archive.py b/archivebox/archive.py index d2072148..aeddf8b3 100755 --- a/archivebox/archive.py +++ b/archivebox/archive.py @@ -70,7 +70,7 @@ def merge_links(archive_path=OUTPUT_DIR, import_path=None, only_new=False): num_new_links = len(all_links) - len(existing_links) if num_new_links and not only_new: - print('[{green}+{reset}] [{}] Adding {} new links from {} to {}/index.json (parsed as {})'.format( + print('[{green}+{reset}] [{}] Adding {} new links from {} to {}/index.json (detected {} format)'.format( datetime.now().strftime('%Y-%m-%d %H:%M:%S'), num_new_links, pretty_path(import_path), diff --git a/archivebox/parse.py b/archivebox/parse.py index 6b08a76e..a66b7c59 100644 --- a/archivebox/parse.py +++ b/archivebox/parse.py @@ -185,7 +185,7 @@ def parse_bookmarks_export(html_file): 'url': url, 'domain': domain(url), 'base_url': base_url(url), - 'timestamp': str(datetime.now().timestamp()), + 'timestamp': str(time.timestamp()), 'tags': "", 'title': match.group(3).strip() or fetch_page_title(url), 'sources': [html_file.name], @@ -218,7 +218,7 @@ def parse_pinboard_rss_feed(rss_file): 'url': url, 'domain': domain(url), 'base_url': base_url(url), - 'timestamp': str(datetime.now().timestamp()), + 'timestamp': str(time.timestamp()), 'tags': tags, 'title': title or fetch_page_title(url), 'sources': [rss_file.name], @@ -243,7 +243,7 @@ def parse_medium_rss_feed(rss_file): 'url': url, 'domain': domain(url), 'base_url': base_url(url), - 'timestamp': str(datetime.now().timestamp()), + 'timestamp': str(time.timestamp()), 'tags': '', 'title': title or fetch_page_title(url), 'sources': [rss_file.name],