You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There may have been changes to the Microsoft Update Catalog page for parsing the next page since the first results page is returned. Adding an option to specify the page number in the search query (e.g. https://catalog.update.microsoft.com/Search.aspx?q=2024-11+Cumulative+Update&p=2) without it getting encoded q={UrlEncode(Query)}&p={PageNumber}) could work for parsing the next page for both SendSearchQueryAsync() and ParseNextPageAsync().
Example of pagination using ResultsCount and PageSize to determine NextPage:
// TODO: Bug with catalogClient.ParseNextPageAync function,
// which is also used by SendSearchQueryAsync(catalogQuery)
// Work-around using GetFirstPageFromSearchQueryAsync to get first page of results
int page = 1;
int pageSize = 25;
var currentResultsPage = await catalogClient.GetFirstPageFromSearchQueryAsync(catalogQuery);
var allSearchResults = currentResultsPage.SearchResults;
int totalCount = currentResultsPage.ResultsCount;
var maxPages = (totalCount / pageSize) + (totalCount % pageSize == 0 ? 0 : 1);
while (page < maxPages)
{
page++;
// TODO: Bug with catalogClient.ParseNextPageAync function,
// appears to parse currentPage instead of nextPage
currentResultsPage = await catalogClient.ParseNextPageAsync(currentResultsPage);
allSearchResults.AddRange(currentResultsPage.SearchResults);
}
The text was updated successfully, but these errors were encountered:
There may have been changes to the Microsoft Update Catalog page for parsing the next page since the first results page is returned. Adding an option to specify the page number in the search query (e.g. https://catalog.update.microsoft.com/Search.aspx?q=2024-11+Cumulative+Update&p=2) without it getting encoded
q={UrlEncode(Query)}&p={PageNumber})
could work for parsing the next page for both SendSearchQueryAsync() and ParseNextPageAsync().Example of pagination using ResultsCount and PageSize to determine NextPage:
The text was updated successfully, but these errors were encountered: