mirror of https://gitlab.com/bashrc2/epicyon
Replace page number in bookmark posts
parent
f019aa9dc2
commit
07ea0d1000
|
@ -3183,6 +3183,12 @@ def preparePostFromHtmlCache(postHtml: str, boxName: str,
|
||||||
# if on the bookmarks timeline then remain there
|
# if on the bookmarks timeline then remain there
|
||||||
if boxName == 'tlbookmarks' or boxName == 'bookmarks':
|
if boxName == 'tlbookmarks' or boxName == 'bookmarks':
|
||||||
postHtml = postHtml.replace('?tl=inbox', '?tl=tlbookmarks')
|
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 = postHtml.replace(';-999;', ';' + str(pageNumber) + ';')
|
||||||
withPageNumber = withPageNumber.replace('?page=-999',
|
withPageNumber = withPageNumber.replace('?page=-999',
|
||||||
'?page=' + str(pageNumber))
|
'?page=' + str(pageNumber))
|
||||||
|
|
Loading…
Reference in New Issue