Skip to content

Commit

Permalink
Fix issue Tumblr hidden crawler sometimes detected wrong latest post id
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas694 committed Dec 15, 2024
1 parent c5c74e6 commit 4a68e1b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ private async Task<ulong> GetHighestPostIdAsync()

private async Task<ulong> GetHighestPostIdCoreAsync()
{
string document = await GetSvcPageAsync("2", "0");
// normally 2 posts, where the 1st one could be a pinned one, should be enough, but strangely enough
// for some blogs up to 4 very old posts can be returned. So just read 5 or 10 posts!?
string document = await GetSvcPageAsync("10", "0");
var response = ConvertJsonToClass<TumblrJson>(document);

Post post = response.Response?.Posts?.FirstOrDefault(x => !x.IsPinned);
Expand Down

0 comments on commit 4a68e1b

Please sign in to comment.