Raccolta: 429 del CDN come rallentamento, attese crescenti e recupero dei falliti, storico e seguiti senza pagina di ripresa, lacuna sotto la prima pagina, eliminazioni durante lo scaricamento (regole-3, cdn-429, dl-1, post-loop, walk-1, check-1, scroll-1, reader-1, h9-1, ring-1, library-2, dedup-1, tmp-1, budget-1, regole-4, kind-1, vocab-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
28 files changed
+2619
-200
No files matched your search
@@ -287,6 +287,43 @@ public sealed partial class RecipeRunner : IRecipeRunner
|
||||
private static bool IsOwnedBy(ContentItem item, Account account) =>
|
||||
item.Owner is { } owner && (account.InstagramId is { } id ? owner.Id == id : string.Equals(owner.Username, account.Username, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
/// <summary>
|
||||
/// A post, not a story (it expires) nor an item found inside a highlight collection. The reader recognizes all three
|
||||
/// by the same shape; stories and collection items are saved only by the viewer recipes, and only when shown
|
||||
/// (spec §6.3: «anche quando la pagina riceve in anticipo l'elenco completo»).
|
||||
/// </summary>
|
||||
private static bool IsPostLike(ContentItem item) => item.ExpiresAt is null && item.HighlightId is null;
|
||||
|
||||
/// <summary>
|
||||
/// Pinned on top of a profile (spec §6.3: not «already known» for the stop rule, nor a limit of history). When the
|
||||
/// vocabulary has no key for it, a post followed on its page by a newer one is out of the order of the grid,
|
||||
/// newest first: that is what a pinned post looks like.
|
||||
/// </summary>
|
||||
private bool LooksPinned(ContentItem item, IReadOnlyList<ContentItem> page)
|
||||
{
|
||||
if (item.Pinned)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Env.Capture.Reader.Vocabulary.Content.Pinned.IsSet)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var index = -1;
|
||||
for (var i = 0; i < page.Count; i++)
|
||||
{
|
||||
if (string.Equals(page[i].Id, item.Id, StringComparison.Ordinal))
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return index >= 0 && page.Skip(index + 1).Any(later => later.TakenAt > item.TakenAt);
|
||||
}
|
||||
|
||||
private static IReadOnlyDictionary<string, string> Values(params (string Key, string Value)[] pairs) =>
|
||||
pairs.ToDictionary(p => p.Key, p => p.Value, StringComparer.Ordinal);
|
||||
}
|
||||
Reference in new issue
Block a user