From 07e5d32ed4975e17b63624f7a0384212c1fcdaff Mon Sep 17 00:00:00 2001
From: czf <2455501+czf@users.noreply.github.com>
Date: Sun, 5 Feb 2023 18:28:56 -0800
Subject: [PATCH] need new wayback client also date wrap support message since
amazon smile is ending
---
ArchiveBot.Core/ArchiveBot.Core.csproj | 2 +-
ArchiveBot.Core/ArchiveBot.cs | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ArchiveBot.Core/ArchiveBot.Core.csproj b/ArchiveBot.Core/ArchiveBot.Core.csproj
index ae00ed6..df79b69 100644
--- a/ArchiveBot.Core/ArchiveBot.Core.csproj
+++ b/ArchiveBot.Core/ArchiveBot.Core.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/ArchiveBot.Core/ArchiveBot.cs b/ArchiveBot.Core/ArchiveBot.cs
index 7a34b27..2ea9502 100644
--- a/ArchiveBot.Core/ArchiveBot.cs
+++ b/ArchiveBot.Core/ArchiveBot.cs
@@ -36,7 +36,9 @@ public class ArchiveBot
private readonly EditForNewsbank _editForNewsbank;
private readonly CheckBotMail _checkBotMail;
private bool _checkTableExists = true;
-
+ private const string SUPPORT_LINKS =
+ @"^^You ^^can ^^support ^^Archive.org ^^via [^^(Amazon) ^^(Smile)](https://smile.amazon.com/ch/94-3242767)
+ ^^You ^^can ^^support ^^Seattle ^^Public ^^Library ^^via [^^(Amazon) ^^(Smile)](https://smile.amazon.com/ch/91-1140642)";
private static bool? _debug;
public static bool Debug
@@ -305,13 +307,12 @@ private async Task ProcessPost(Post p, TableClient articleTableClient)
}
string msg =
- $@"[Archive.org version.]({archivedUrl.ToString()})
+ $@"[Archive.org version.]({archivedUrl})
:0:
----
-^^You ^^can ^^support ^^Archive.org ^^via [^^(Amazon) ^^(Smile)](https://smile.amazon.com/ch/94-3242767)
-^^You ^^can ^^support ^^Seattle ^^Public ^^Library ^^via [^^(Amazon) ^^(Smile)](https://smile.amazon.com/ch/91-1140642)
+{(DateTime.UtcNow < new DateTime(2023, 2,20) ? SUPPORT_LINKS : string.Empty)}
^^I'm ^^a ^^bot, ^^beep ^^boop [ ^^((fork) ^^(me) ^^(on) ^^(github))](https://github.com/czf/ArchiveBot)";
_log.LogInformation(msg);