fix: start replies fetch from newest, ignore stale DB timestamp
The DB-derived MAX(N.timestamp)+1 for a post is unreliable - many notes were stored with the same timestamp (likely crawl time, not the actual note timestamp), so passing it as before_timestamp excluded all real replies and returned an empty notes array. Diagnostics showed two unrelated posts coming back with identical totals (1625/1021/603) and zero notes. Now we start with no before_timestamp (newest page) and let pagination walk backward via each page's last-note timestamp.
This commit is contained in:
@@ -452,11 +452,11 @@ namespace URLNotesGrabberCORE
|
|||||||
const int MaxPages = 10;
|
const int MaxPages = 10;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[Reply Text] Fetching reply text for {blogName}/{postID}/{timestamp}");
|
Console.WriteLine($"[Reply Text] Fetching reply text for {blogName}/{postID}");
|
||||||
|
|
||||||
int replyCount = 0;
|
int replyCount = 0;
|
||||||
int emptyReplyCount = 0;
|
int emptyReplyCount = 0;
|
||||||
long pageTimestamp = timestamp;
|
long pageTimestamp = 0;
|
||||||
int page = 0;
|
int page = 0;
|
||||||
|
|
||||||
while (page < MaxPages)
|
while (page < MaxPages)
|
||||||
|
|||||||
Reference in New Issue
Block a user