From 787491d9203c62985736a03b9427a4e26204d8e9 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Fri, 23 Sep 2022 00:05:16 +0200 Subject: [PATCH] 10 min interval to merge news posts (images) --- update_news.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_news.js b/update_news.js index 3e2cfb76..5ba26993 100644 --- a/update_news.js +++ b/update_news.js @@ -17,6 +17,7 @@ const nhm = new NodeHtmlMarkdown(); const photoUrlRE = /url\(\'(.*?)\'/; const emojiRE = /_\*\*(\u00a9|\u00ae|[\u2000-\u3300]\ufe0f?|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]\ufe0f?|\ud83e[\ud000-\udfff]|\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF])\*\*_/gi; +const kPostsDiffInMs = 10 * 60 * 1000; // Ten minutes. function downloadAsync(url, path) { return new Promise((resolve, reject) => { @@ -115,7 +116,6 @@ function parseHtml(html) { const downloads = []; let prevDir; let prevDate; - const kPostsDiffInMs = 5 * 60 * 1000; // Five minutes. messages.forEach(m => { let photos = m.querySelectorAll('.tgme_widget_message_photo_wrap'); let text = m.querySelector('.tgme_widget_message_text');