From 07ea0d10004bc1c31eb4cf7e4d4ed4d73c57e8b2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 22 May 2020 12:48:58 +0000 Subject: [PATCH] Replace page number in bookmark posts --- webinterface.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webinterface.py b/webinterface.py index a8af7fdf0..9dd9b2d76 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3183,6 +3183,12 @@ def preparePostFromHtmlCache(postHtml: str, boxName: str, # if on the bookmarks timeline then remain there if boxName == 'tlbookmarks' or boxName == 'bookmarks': postHtml = postHtml.replace('?tl=inbox', '?tl=tlbookmarks') + if '?page=' in postHtml: + pageNumberStr = postHtml.split('?page=')[1] + if '?' in pageNumberStr: + pageNumberStr = pageNumberStr.split('?')[0] + postHtml = postHtml.replace('?page=' + pageNumberStr, '?page=-999') + withPageNumber = postHtml.replace(';-999;', ';' + str(pageNumber) + ';') withPageNumber = withPageNumber.replace('?page=-999', '?page=' + str(pageNumber))