From 6c71349c0bc1a8b467befaa5fb8150817102eb9c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 7 Oct 2020 20:49:57 +0100 Subject: [PATCH] Getting page number --- daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index e49a947a..44ba890b 100644 --- a/daemon.py +++ b/daemon.py @@ -6513,7 +6513,8 @@ class PubServer(BaseHTTPRequestHandler): if not inboxNewsFeed: inboxNewsFeed = [] if self._requestHTTP(): - nickname = 'news' + nickname = path.replace('/users/', '') + nickname = nickname.replace('/tlnews', '') pageNumber = 1 if '?page=' in nickname: pageNumber = nickname.split('?page=')[1] @@ -6522,6 +6523,7 @@ class PubServer(BaseHTTPRequestHandler): pageNumber = int(pageNumber) else: pageNumber = 1 + nickname = 'news' if 'page=' not in path: # if no page was specified then show the first inboxNewsFeed = \